|
| TaIndexSet (void) |
|
| TaIndexSet (const TaIndexSet &rOtherSet) |
|
| TaIndexSet (const IndexSet &rOtherSet) |
|
| TaIndexSet (const std::string &rFilename, const std::string &rLabel="") |
|
virtual | ~TaIndexSet (void) |
|
virtual TaIndexSet & | Assign (const TBaseSet< Idx > &rSrc) |
|
virtual TaIndexSet & | operator= (const IndexSet &rSrc) |
|
Idx | Insert (void) |
|
Idx | Insert (const Attr &rAttr) |
|
bool | Insert (const Idx &rIndex) |
|
bool | Insert (const Idx &rIndex, const Attr &attr) |
|
virtual void | InsertSet (const IndexSet &rOtherSet) |
|
virtual void | InsertSet (const TBaseSet< Idx > &rOtherSet) |
|
bool | Erase (const Idx &rIndex) |
|
IndexSet::Iterator | Erase (const Iterator &pos) |
|
void | EraseSet (const IndexSet &rOtherSet) |
|
virtual void | EraseSet (const TBaseSet< Idx > &rOtherSet) |
|
void | RestrictSet (const IndexSet &rOtherSet) |
|
virtual void | RestrictSet (const TBaseSet< Idx > &rOtherSet) |
|
const Attr * | AttributeType (void) const |
|
Attr * | Attributep (const Idx &rElem) |
|
const Attr & | Attribute (const Idx &rElem) const |
|
void | Attribute (const Idx &rElem, const Attr &rAttr) |
|
void | Attribute (const Idx &rElem, const Type &rAttr) |
|
void | AttributeTry (const Idx &rElem, const Type &rAttr) |
|
| IndexSet (void) |
|
| IndexSet (const IndexSet &rOtherSet) |
|
| IndexSet (const TBaseSet< Idx > &rOtherSet) |
|
| IndexSet (const std::string &rFilename, const std::string &rLabel="") |
|
virtual | ~IndexSet (void) |
|
Idx | MaxIndex (void) const |
|
bool | Valid (const Idx &rIndex) const |
|
Idx | Insert (void) |
|
bool | Insert (const Idx &rIndex) |
|
Idx | Signature (void) const |
|
std::string | Str (const Idx &rIndex) const |
|
| TBaseSet (void) |
|
| TBaseSet (const TBaseSet &rOtherSet) |
|
| TBaseSet (const std::string &rFilename, const std::string &rLabel="BaseSet") |
|
virtual | ~TBaseSet (void) |
|
const std::string & | Name (void) const |
|
void | Name (const std::string &rName) |
|
virtual void | Clear (void) |
|
Idx | Size (void) const |
|
bool | Empty (void) const |
|
virtual std::string | Str (const Idx &rElem) const |
|
Iterator | Begin (void) const |
|
Iterator | End (void) const |
|
virtual bool | Valid (const Idx &rElem) const |
|
virtual bool | Erase (const Idx &rElem) |
|
virtual Iterator | Erase (const Iterator &pos) |
|
virtual void | EraseSet (const TBaseSet &rOtherSet) |
|
virtual void | RestrictSet (const TBaseSet &rOtherSet) |
|
virtual bool | Disjoint (const TBaseSet &rOtherSet) const |
|
virtual bool | Insert (const Idx &rElem) |
|
virtual Iterator | Inject (const Iterator &pos, const Idx &rElem) |
|
virtual void | Inject (const Idx &rElem) |
|
virtual void | InsertSet (const TBaseSet &rOtherSet) |
|
bool | Exists (const Idx &rElem) const |
|
Iterator | Find (const Idx &rElem) const |
|
TBaseSet | operator+ (const TBaseSet &rOtherSet) const |
|
TBaseSet | operator- (const TBaseSet &rOtherSet) const |
|
TBaseSet | operator* (const TBaseSet &rOtherSet) const |
|
bool | operator<= (const TBaseSet &rOtherSet) const |
|
bool | operator>= (const TBaseSet &rOtherSet) const |
|
bool | operator< (const TBaseSet &rOtherSet) const |
|
void | DValid (const std::string &rMessage="") const |
|
void | Detach (DetachMode flag=AttrIncl) const |
|
void | Lock (void) const |
|
virtual bool | AttributeTest (const Type &rAttr) const |
|
virtual TBaseSet & | AssignWithoutAttributes (const TBaseSet &rSourceSet) |
|
virtual void | Attributes (const TBaseSet &rOtherSet) |
|
Idx | AttributesSize (void) const |
|
void | ClearAttributes (void) |
|
bool | EqualAttributes (const TBaseSet &rOtherSet) const |
|
virtual AttributeVoid * | Attributep (const Idx &rElem) |
|
virtual const AttributeVoid & | Attribute (const Idx &rElem) const |
|
virtual void | Attribute (const Idx &rElem, const Type &rAttr) |
|
virtual void | ClrAttribute (const Idx &rElem) |
|
virtual void | XElementTag (const std::string &rTag) |
|
virtual const std::string & | TypeName (void) const |
|
virtual void | TypeName (const std::string &rType) |
|
Type & | operator= (const Type &rSrc) |
|
bool | operator== (const Type &rOther) const |
|
bool | operator!= (const Type &rOther) const |
|
| Type (void) |
|
| Type (const Type &rType) |
|
virtual | ~Type (void) |
|
virtual Type * | New (void) const |
|
virtual Type * | Copy (void) const |
|
virtual const Type * | Cast (const Type *pOther) const |
|
virtual Type & | Assign (const Type &rSrc) |
|
Type & | operator= (const Type &rSrc) |
|
virtual bool | Equal (const Type &rOther) const |
|
bool | operator== (const Type &rOther) const |
|
bool | operator!= (const Type &rOther) const |
|
void | Write (const Type *pContext=0) const |
|
void | Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const |
|
void | Write (const std::string &pFileName, std::ios::openmode openmode) const |
|
void | Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
|
virtual void | XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const |
|
void | XWrite (const Type *pContext=0) const |
|
void | XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
|
std::string | ToString (const std::string &rLabel="", const Type *pContext=0) const |
|
std::string | ToText (const std::string &rLabel="", const Type *pContext=0) const |
|
void | DWrite (const Type *pContext=0) const |
|
void | DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const |
|
void | DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
|
void | SWrite (TokenWriter &rTw) const |
|
void | SWrite (void) const |
|
std::string | ToSText (void) const |
|
void | Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0) |
|
void | FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0) |
|
void | Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
|
| TAttrMap (TBaseSet< Idx, std::less< Idx > > *pBaseSetRef) |
|
virtual | ~TAttrMap (void) |
|
void | AssignWithAttributes (const TBaseSet< Idx, std::less< Idx > > &rSourceSet) |
|
const Attr * | AttributeType (void) const |
|
Attr * | Attributep (const Idx &rElem) |
|
const Attr & | Attribute (const Idx &rElem) const |
|
void | Attribute (const Idx &rElem, const Type &attr) |
|
void | Attribute (const Idx &rElem, const Attr &attr) |
|
void | AttributeTry (const Idx &rElem, const Type &attr) |
|
bool | Insert (const Idx &rElem) |
|
bool | Insert (const Idx &rElem, const Attr &attr) |
|
void | InsertSet (const TBaseSet< Idx, std::less< Idx > > &rOtherSet) |
|
bool | Erase (const Idx &rElem) |
|
TBaseSet< Idx, std::less< Idx > >::Iterator | Erase (const typename TBaseSet< Idx, std::less< Idx > >::Iterator &pos) |
|
void | EraseSet (const TBaseSet< Idx, std::less< Idx > > &rOtherSet) |
|
void | RestrictSet (const TBaseSet< Idx, std::less< Idx > > &rOtherSet) |
|
|
void | DoAssign (const TaIndexSet &rSource) |
|
void | DoAssign (const IndexSet &rSource) |
|
virtual void | DoWrite (TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const |
|
virtual void | DoXWrite (TokenWriter &tw, const std::string &rLabel="", const Type *pContext=0) const |
|
virtual void | DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0) |
|
virtual const std::string & | XElementTag (void) const |
|
virtual void | DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const |
|
virtual void | DoSWrite (TokenWriter &rTw) const |
|
void | DoAssign (const TBaseSet &rSourceSet) |
|
bool | DoEqual (const TBaseSet &rOtherSet) const |
|
void | DoAttribute (const Idx &rElem, const Type *pAttr) |
|
const AttributeVoid * | DoAttribute (const Idx &rElem) const |
|
AttributeVoid * | DoAttributeExplicit (const Idx &rElem) |
|
TBaseSet< Idx, std::less< Idx > >::Iterator | ThisIterator (const typename std::set< Idx, std::less< Idx > >::const_iterator &sit) const |
|
void | RelinkClients (void) |
|
void | AttachClient (TBaseSet *pRef) const |
|
void | DetachClient (TBaseSet *pRef) const |
|
void | AttachIterator (Iterator *pFit) const |
|
void | DetachIterator (Iterator *pFit) const |
|
virtual const TypeDefinition * | TypeDefinitionp (void) const |
|
void | DoAssign (const Type &rSrc) |
|
bool | DoEqual (const Type &rOther) const |
|
virtual Token | XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const |
|
template<class Attr>
class faudes::TaIndexSet< Attr >
Set of indices with attributes. A TaIndexSet<Attr> is a template derived from IndexSet, such that each set element has an Attribute of class Attr. The template parameter Attr must provide basic functions for file IO and must define a default value, see AttributeVoid and AttributeFlags for an examples. Attributes are maintained by an STL map to associate indices with attributes different from the default value. Thus, attributes with default value do not take up any memeory.
- Parameters
-
mAttributeMap | STL map of type std::map<Idx,Attr> to hold attributes |
The copy constructor copies attributes; the methods InsertSet(), EraseSet() and RestrictSet() maintain attributes; all other set operations derived from IndexSet
either return a IndexSet (no attributes) or set all attributes to the dafault value. To set or get an attribute of an index that does not exist in the set is considered as an error and triggers an exception (id 60) when the macro FAUDES_CHECKED is defined.
The format for token IO is demonstrated by the following example of a set with name "MySet" consisting of indices 17, 25, 40, where index 25 has a nontrivial attribute attached:
<Myset>
17
25 <AValue> "Some Value" </AValue>
40
</MySet>
Note that attributes may be either subsections or tokens of type different from integer and string. This is to allow reading a token stream to a class with incompatible (or no) attributes.
Definition at line 318 of file cfl_indexset.h.