|
Go to the documentation of this file.
23 #ifndef FAUDES_NAMESET_H
24 #define FAUDES_NAMESET_H
39 template< class Attr> class TaNameSet;
108 NameSet( const std::string& rFilename, const std::string& rLabel = "");
149 bool Insert( const Idx& rIndex);
162 Idx Insert( const std::string& rName);
172 virtual void InsertSet( const NameSet& rOtherSet);
196 virtual bool Erase( const Idx& rIndex);
208 virtual bool Erase( const std::string& rName);
220 virtual NameSet::Iterator Erase( const Iterator& pos);
230 void EraseSet( const NameSet& rOtherSet);
254 void RestrictSet( const NameSet& rOtherSet);
284 void SymbolicName( Idx index, const std::string& rName);
300 void SymbolicName( const std::string& rName, const std::string& rNewName);
311 std::string SymbolicName( Idx index) const;
322 Idx Index( const std::string& rName) const;
333 bool Exists( const Idx& rIndex) const;
344 bool Exists( const std::string& rName) const;
356 NameSet::Iterator Find( const Idx& rIndex) const;
368 NameSet::Iterator Find( const std::string& rName) const;
406 bool operator<= ( const NameSet& rOtherSet) const;
409 bool operator>= ( const NameSet& rOtherSet) const;
422 std::string Str( const Idx& rIndex) const;
438 void DoAssign( const NameSet& rSourceSet);
450 bool DoEqual( const NameSet& rOtherSet) const;
466 virtual void DoWrite( TokenWriter& tw, const std::string& rLabel= "", const Type* pContext=0) const;
481 virtual void DoDWrite( TokenWriter& tw, const std::string& rLabel= "", const Type* pContext=0) const;
497 virtual void DoXWrite( TokenWriter& tw, const std::string& rLabel= "", const Type* pContext=0) const;
520 virtual void DoRead( TokenReader& tr, const std::string& rLabel = "", const Type* pContext=0);
607 TaNameSet(const std:: string& rFilename, const std:: string& rLabel = "");
638 using NameSet::Iterator;
669 virtual bool Insert( const Idx& rIndex, const Attr& rAttr);
684 virtual Idx Insert( const std::string& rName);
700 virtual Idx Insert( const std::string& rName, const Attr& rAttr);
738 virtual bool Erase( const Idx& rIndex);
750 virtual bool Erase( const std::string& rName);
762 virtual typename NameSet::Iterator Erase( const Iterator& pos);
839 std::string Str( const Idx& rIndex) const;
880 #define TaEventSet TaNameSet
905 FD_DC( "TaNameSet(" << this << ")::TaNameSet()");
907 this->Name( "NameSet");
916 FD_DC( "TaNameSet(" << this << ")::TaNameSet(rOtherSet " << &rOtherSet << ")");
926 FD_DC( "TaNameSet(" << this << ")::TaNameSet(rOtherSet " << &rOtherSet << ")");
937 FD_DC( "TaNameSet(" << this << ")::TaNameSet(" << rFilename << ")");
939 Read(rFilename, rLabel);
953 FD_DC( "TaNameSet(" << this << ")::DoAssign( [a] " << &rSourceSet << ")");
961 FD_DC( "TaNAMESet::DoEqual()");
969 FD_DC( "TaNameSet(" << this << ")::Assign( [v] " << &rSourceSet << ")");
971 #ifdef FAUDES_CHECKED
973 std::stringstream errstr;
974 errstr << "cannot cast to nameset" << std::endl;
975 throw Exception( "TaNameSet::Assign", errstr.str(), 67);
989 #ifdef FAUDES_CHECKED
990 if(!mpSymbolTable->Exists(rIndex)) {
991 std::stringstream errstr;
992 errstr << "index " << rIndex << " has no symbolic name" << std::endl;
993 throw Exception( "TaNameSet::Insert", errstr.str(), 65);
1001 template< class Attr>
1003 #ifdef FAUDES_CHECKED
1004 if(!mpSymbolTable->Exists(rIndex)) {
1005 std::stringstream errstr;
1006 errstr << "index " << rIndex << " has no symbolic name" << std::endl;
1007 throw Exception( "TaNameSet::Insert", errstr.str(), 65);
1015 template< class Attr>
1017 FD_DC( "TaNameSet(" << this << ")::Insert(" << rName << ")");
1023 template< class Attr>
1025 FD_DC( "TaNameSet(" << this << ")::Insert(" << rName << ")");
1032 template< class Attr>
1034 FD_DC( "TaNameSet(" << this << ")::InsertSet(" << &rOtherSet << ")");
1035 #ifdef FAUDES_CHECKED
1037 std::stringstream errstr;
1038 errstr << "symboltable mismach aka not implemented" << std::endl;
1039 throw Exception( "TaNameSet::InsertSet", errstr.str(), 67);
1046 template< class Attr>
1048 FD_DC( "TaNameSet(" << this << ")::InsertSet(" << &rOtherSet << "):: downcast");
1049 #ifdef FAUDES_CHECKED
1052 std::stringstream errstr;
1053 errstr << "cannot cast to nameset" << std::endl;
1054 throw Exception( "TaNameSet::InsertSet", errstr.str(), 67);
1057 std::stringstream errstr;
1058 errstr << "symboltable mismatch aka not implemented" << std::endl;
1059 throw Exception( "TaNameSet::InsertSet", errstr.str(), 67);
1066 template< class Attr>
1068 FD_DC( "TaNameSet(" << this << ")::Erase(" << rIndex << ")");
1073 template< class Attr>
1075 FD_DC( "TaNameSet(" << this << ")::Erase(" << rName << ")");
1076 Idx index = mpSymbolTable->Index(rName);
1077 #ifdef FAUDES_CHECKED
1079 std::stringstream errstr;
1080 errstr << "name \"" << rName << "\" not found in TaNameSet" << std::endl;
1081 throw Exception( "TaNameSet::Erase", errstr.str(), 60);
1088 template< class Attr>
1094 template< class Attr>
1096 FD_DC( "TaNameSet(" << this << ")::EraseSet(" << rOtherSet. ToString() << ")");
1097 #ifdef FAUDES_CHECKED
1099 std::stringstream errstr;
1100 errstr << "symboltable mismach aka not implemented" << std::endl;
1101 throw Exception( "TaNameSet::EraseSet", errstr.str(), 67);
1109 template< class Attr>
1111 #ifdef FAUDES_CHECKED
1114 std::stringstream errstr;
1115 errstr << "cannot cast to nameset" << std::endl;
1116 throw Exception( "TaNameSet::EraseSet", errstr.str(), 67);
1119 std::stringstream errstr;
1120 errstr << "symboltable mismatch aka not implemented" << std::endl;
1121 throw Exception( "TaNameSet::EraseSet", errstr.str(), 67);
1129 template< class Attr>
1131 FD_DC( "TaNameSet(" << this << ")::RestrictSet(" << rOtherSet. ToString() << ")");
1132 #ifdef FAUDES_CHECKED
1134 std::stringstream errstr;
1135 errstr << "symboltable mismach aka not implemented" << std::endl;
1136 throw Exception( "TaNameSet::RestrictSet", errstr.str(), 67);
1143 template< class Attr>
1145 #ifdef FAUDES_CHECKED
1148 std::stringstream errstr;
1149 errstr << "cannot cast to nameset" << std::endl;
1150 throw Exception( "TaNameSet::EraseSet", errstr.str(), 67);
1153 std::stringstream errstr;
1154 errstr << "symboltable mismatch aka not implemented" << std::endl;
1155 throw Exception( "TaNameSet::EraseSet", errstr.str(), 67);
1163 template< class Attr>
1165 FD_DC( "TaNameSet(" << this << ")::Attributes(otherset) with type " << typeid(*rOtherSet. AttributeType()).name());
1166 #ifdef FAUDES_CHECKED
1169 std::stringstream errstr;
1170 errstr << "cannot cast to nameset" << std::endl;
1171 throw Exception( "TaNameSet::Attributes(otherset)", errstr.str(), 67);
1173 if(nset->mpSymbolTable!=mpSymbolTable) {
1174 std::stringstream errstr;
1175 errstr << "symboltable mismatch aka not implemented" << std::endl;
1176 throw Exception( "TaNameSet::Attributes(otherset)", errstr.str(), 67);
1184 template< class Attr>
libFAUDES 2.28a
--- 2016.09.13
--- c++ api documentaion by doxygen
|