Class documentation of Concepts

Loading...
Searching...
No Matches
cellConditions.hh
1
6#ifndef cellConditions_hh
7#define cellConditions_hh
8
9#include <map>
10#include "toolbox/set.hh"
11#include "semantics.hh"
12#include "connector.hh"
13#include "continuityData.hh"
14
15namespace concepts {
16
17 // forward declarations
18 //class Attribute;
19
20 // ********************************************************* CellCondition **
21
23 public:
74 enum inactivTypes { ACTIVE = 0, INACTIVE, INACTIVEPLUS, SWITCH_ON,
75 SWITCH_OFF, DIVIDE,
76 MAX_TYPE };
85
88
89 virtual ~CellCondition();
90
92 enum inactivTypes type() const { return type_; }
93
95 concepts::Set<Attribute> attributes() const { return attributes_; }
96
98 std::string typeStr() const;
99
102
106 bool active(const Connector2& cell, const Connector0& vertex) const;
107 protected:
108 virtual std::ostream& info(std::ostream& os) const;
109 private:
111 enum inactivTypes type_;
113 concepts::Set<Attribute> attributes_;
114
118 const Attribute& getAttr_(const Connector0&, const Connector1&,
119 const Connector1&) const;
120 };
121
122
123 // ******************************************************** CellConditions **
124
125 class CellConditions : public Semantics<CellCondition> {
126 public:
132 CellConditions(const bool emptyElements = true);
133
137
140
147
155 virtual CellCondition operator() (Attribute attrib) const;
156
166 void add(const Attribute& attrib, const CellCondition& i);
167
168 inline bool emptyElements() const { return emptyElements_; }
169 protected:
170 virtual std::ostream& info(std::ostream& os) const;
171 private:
175 mutable std::map<uint, CellCondition> inactiveCells_;
177 bool emptyElements_;
178
180 };
181
182} // namespace concepts
183
184#endif // cellConditions_hh
bool active(const Connector2 &cell, const Connector0 &vertex) const
CellCondition(const CellCondition &cnd)
Copy constructor.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
std::string typeStr() const
Return the type of the cell condition as output string.
concepts::Set< Attribute > attributes() const
Returns the attribute set.
enum inactivTypes type() const
Returns the type of the cell condition.
virtual CellCondition & operator=(const CellCondition &i)
Assignment operator.
CellCondition(const enum inactivTypes type, Set< Attribute > attributes=Set< Attribute >())
CellConditions(const bool emptyElements=true)
CellConditions(const CellConditions &cnd)
Copy constructor.
CellConditions(const enum CellCondition::inactivTypes type)
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual CellCondition operator()(Attribute attrib) const
void add(const Attribute &attrib, const CellCondition &i)
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320