|
Go to the documentation of this file.
23 #ifndef FAUDES_RTITYPES_H
24 #define FAUDES_RTITYPES_H
176 class TypeDefinition;
271 virtual Type* New( void) const;
285 virtual Type* Copy( void) const;
300 virtual const Type* Cast( const Type* pOther) const;
306 virtual void Clear( void);
314 virtual bool IsDefault( void) const;
333 virtual Type& Assign( const Type& rSrc);
372 virtual bool Equal( const Type& rOther) const;
390 bool operator==( const Type& rOther) const;
406 bool operator!=( const Type& rOther) const;
418 virtual void Name( const std::string& rName);
429 virtual const std::string& Name( void) const;
442 virtual const std::string& TypeName( void) const;
453 void Write( const Type* pContext=0) const;
472 void Write( const std::string& pFileName, const std::string& rLabel= "",
473 const Type* pContext=0, std::ios::openmode openmode = std::ios::out|std::ios::trunc) const;
488 void Write( const std::string& pFileName, std::ios::openmode openmode) const;
505 void Write( TokenWriter& rTw, const std::string& rLabel= "", const Type* pContext=0) const;
523 virtual void XWrite( const std::string& pFileName, const std::string& rLabel= "",
524 const Type* pContext=0) const;
535 void XWrite( const Type* pContext=0) const;
552 void XWrite( TokenWriter& rTw, const std::string& rLabel= "", const Type* pContext=0) const;
568 std::string ToString( const std::string& rLabel= "", const Type* pContext=0) const;
586 std::string ToText( const std::string& rLabel= "", const Type* pContext=0) const;
597 void DWrite( const Type* pContext=0) const;
616 void DWrite( const std::string& pFileName, const std::string& rLabel= "",
617 const Type* pContext=0, std::ios::openmode openmode = std::ios::out|std::ios::trunc) const;
634 void DWrite( TokenWriter& rTw, const std::string& rLabel= "", const Type* pContext=0) const;
655 void SWrite( void) const;
667 std::string ToSText( void) const;
685 void Read( const std::string& rFileName, const std::string& rLabel = "", const Type* pContext=0);
702 void FromString( const std::string& rString, const std::string& rLabel= "", const Type* pContext=0);
720 void Read( TokenReader& rTr, const std::string& rLabel = "", const Type* pContext=0);
735 void DoAssign( const Type& rSrc);
747 bool DoEqual( const Type& rOther) const;
766 virtual void DoRead( TokenReader& rTr, const std::string& rLabel = "", const Type* pContext=0);
784 virtual void DoWrite( TokenWriter& rTw, const std::string& rLabel= "", const Type* pContext=0) const;
804 virtual void DoXWrite( TokenWriter& rTw, const std::string& rLabel= "", const Type* pContext=0) const;
822 virtual void DoDWrite( TokenWriter& rTw, const std::string& rLabel= "", const Type* pContext=0) const;
865 virtual Token XBeginTag( const std::string& rLabel= "", const std::string& rFallbackLabel= "") const;
879 #define FAUDES_TYPE_DECLARATION(ftype,ctype,cbase) \
880 public: virtual ctype* New(void) const; \
881 public: virtual ctype* Copy(void) const; \
882 public: virtual const Type* Cast(const Type* pOther) const; \
883 public: virtual ctype& Assign(const Type& rSrc); \
884 public: virtual bool Equal(const Type& rOther) const; \
885 public: ctype& operator=(const ctype& rSrc); \
886 public: bool operator==(const ctype& rOther) const; \
887 public: bool operator!=(const ctype& rOther) const;
890 #define FAUDES_TYPE_TDECLARATION(ftype,ctype,cbase) \
891 public: virtual ctype* New(void) const; \
892 public: virtual ctype* Copy(void) const; \
893 public: virtual const Type* Cast(const Type* pOther) const; \
894 public: virtual ctype& Assign(const Type& rSrc); \
895 public: virtual bool Equal(const Type& rOther) const; \
896 public: ctype& operator=(const ctype& rSrc); \
897 public: bool operator==(const ctype& rOther) const; \
898 public: bool operator!=(const ctype& rOther) const;
901 #define FAUDES_TYPE_IMPLEMENTATION_NEW(ftype,ctype,cbase) \
902 ctype* ctype::New(void) const { return new ctype(); }
903 #define FAUDES_TYPE_IMPLEMENTATION_COPY(ftype,ctype,cbase) \
904 ctype* ctype::Copy(void) const { return new ctype(*this); }
905 #define FAUDES_TYPE_IMPLEMENTATION_CAST(ftype,ctype,cbase) \
906 const Type* ctype::Cast(const Type* pOther) const { \
907 return dynamic_cast< const ctype * >(pOther); }
908 #define FAUDES_TYPE_IMPLEMENTATION_ASSIGN(ftype,ctype,cbase) \
909 ctype& ctype::Assign(const Type& rSrc) { \
910 if(const ctype* csattr=dynamic_cast< const ctype * >(&rSrc)) { \
911 DoAssign(*csattr);} \
913 cbase::Assign(rSrc);}; \
915 ctype& ctype::operator=(const ctype& rSrc) { ; DoAssign(rSrc); return *this; }
916 #define FAUDES_TYPE_IMPLEMENTATION_EQUAL(ftype,ctype,cbase) \
917 bool ctype::Equal(const Type& rOther) const { \
918 if(&rOther==this) return true; \
919 if(typeid(rOther) != typeid(*this)) return false; \
920 const ctype* csattr=dynamic_cast<const ctype*>(&rOther); \
921 if(!csattr) return false; \
922 if(!DoEqual(*csattr)) return false; \
924 bool ctype::operator==(const ctype& rOther) const { return DoEqual(rOther); } \
925 bool ctype::operator!=(const ctype& rOther) const { return !DoEqual(rOther); }
928 #define FAUDES_TYPE_TIMPLEMENTATION_NEW(ftype,ctype,cbase,ctemp) \
929 ctemp ctype* ctype::New(void) const { \
930 return new ctype(); }
931 #define FAUDES_TYPE_TIMPLEMENTATION_COPY(ftype,ctype,cbase,ctemp) \
932 ctemp ctype* ctype::Copy(void) const { \
933 return new ctype(*this); }
934 #define FAUDES_TYPE_TIMPLEMENTATION_CAST(ftype,ctype,cbase,ctemp) \
935 ctemp const Type* ctype::Cast(const Type* pOther) const { \
936 return dynamic_cast< const ctype * >(pOther); }
937 #define FAUDES_TYPE_TIMPLEMENTATION_ASSIGN(ftype,ctype,cbase,ctemp) \
938 ctemp ctype& ctype::Assign(const Type& rSrc) { \
939 if(const ctype* csattr=dynamic_cast< const ctype * >(&rSrc)) { \
940 DoAssign(*csattr);} \
942 cbase::Assign(rSrc);}; \
944 ctemp ctype& ctype::operator=(const ctype& rSrc) { DoAssign(rSrc); return *this; }
945 #define FAUDES_TYPE_TIMPLEMENTATION_EQUAL(ftype,ctype,cbase,ctemp) \
946 ctemp bool ctype::Equal(const Type& rOther) const { \
947 if(&rOther==this) return true; \
948 if(typeid(rOther) != typeid(*this)) return false; \
949 const ctype* csattr=dynamic_cast<const ctype*>(&rOther); \
950 if(!csattr) return false; \
951 if(!DoEqual(*csattr)) return false; \
953 ctemp bool ctype::operator==(const ctype& rOther) const { return DoEqual(rOther); } \
954 ctemp bool ctype::operator!=(const ctype& rOther) const { return !DoEqual(rOther); }
958 #define FAUDES_TYPE_IMPLEMENTATION(ftype,ctype,cbase) \
959 ctype* ctype::New(void) const { \
960 return new ctype(); } \
961 ctype* ctype::Copy(void) const { \
962 return new ctype(*this); } \
963 const Type* ctype::Cast(const Type* pOther) const { \
964 return dynamic_cast< const ctype * >(pOther); } \
965 ctype& ctype::Assign(const Type& rSrc) { \
966 if(const ctype* csattr=dynamic_cast< const ctype * >(&rSrc)) { \
967 this->DoAssign(*csattr);} \
969 cbase::Assign(rSrc);}; \
971 ctype& ctype::operator=(const ctype& rSrc) { this->DoAssign(rSrc); return *this; } \
972 bool ctype::Equal(const Type& rOther) const { \
973 if(&rOther==this) return true; \
974 if(typeid(rOther) != typeid(*this)) return false; \
975 const ctype* csattr=dynamic_cast<const ctype*>(&rOther); \
976 if(!csattr) return false; \
977 if(!this->DoEqual(*csattr)) return false; \
979 bool ctype::operator==(const ctype& rOther) const { return this->DoEqual(rOther); } \
980 bool ctype::operator!=(const ctype& rOther) const { return !this->DoEqual(rOther); }
984 #define FAUDES_TYPE_TIMPLEMENTATION(ftype,ctype,cbase,ctemp) \
985 ctemp ctype* ctype::New(void) const { \
986 return new ctype(); } \
987 ctemp ctype* ctype::Copy(void) const { \
988 return new ctype(*this); } \
989 ctemp const Type* ctype::Cast(const Type* pOther) const { \
990 return dynamic_cast< const ctype * >(pOther); } \
991 ctemp ctype& ctype::Assign(const Type& rSrc) { \
992 if(const ctype* csattr=dynamic_cast< const ctype * >(&rSrc)) { \
993 this->DoAssign(*csattr);} \
995 cbase::Assign(rSrc);}; \
997 ctemp ctype& ctype::operator=(const ctype& rSrc) { this->DoAssign(rSrc); return *this; } \
998 ctemp bool ctype::Equal(const Type& rOther) const { \
999 if(&rOther==this) return true; \
1000 if(typeid(rOther) != typeid(*this)) return false; \
1001 const ctype* csattr=dynamic_cast<const ctype*>(&rOther); \
1002 if(!csattr) return false; \
1003 if(!this->DoEqual(*csattr)) return false; \
1005 ctemp bool ctype::operator==(const ctype& rOther) const { return this->DoEqual(rOther); } \
1006 ctemp bool ctype::operator!=(const ctype& rOther) const { return !this->DoEqual(rOther); }
1014 template<class T, bool = std::is_polymorphic<T>::value>
1061 using Type::operator=;
1062 using Type::operator==;
1063 using Type::operator!=;
1113 using AttrType::operator=;
1114 using AttrType::operator==;
1115 using AttrType::operator!=;
1136 const std::string& Name( void) const;
1144 void Name( const std::string& rName);
1155 virtual const std::string& TypeName( void) const;
1166 virtual void TypeName( const std::string& rType);
1177 virtual const std::string& ElementTag( void) const;
1188 virtual void ElementTag( const std::string& rTag);
1198 virtual const std::string& ElementType( void) const;
1268 using Type::operator=;
1269 using Type::operator==;
1270 using Type::operator!=;
1293 const std::string& Name( void) const;
1302 const std::string& PlugIn( void) const;
1310 const std::string& CType( void) const;
1316 const std::string& TextDoc( void) const;
1322 const std::string& HtmlDoc( void) const;
1328 const std::string& Keywords( void) const;
1340 std::string MatchKeyword( const std::string& rPattern) const;
1347 int KeywordsSize( void) const;
1355 std::string KeywordAt( int pos) const;
1366 bool AutoRegistered( void) const;
1374 bool ApplicationRegistered( void) const;
1388 virtual void MergeDocumentation( TokenReader& rTr);
1400 void Name( const std::string& name);
1408 void PlugIn( const std::string& plugin);
1416 void CType( const std::string& name);
1424 void TextDoc( const std::string& textdoc);
1434 void AutoRegistered( bool flag);
1444 void ApplicationRegistered( bool flag);
1452 void HtmlDoc( const std::string& fname);
1460 void AddKeyword( const std::string& rKeyword);
1498 virtual void DoRead( TokenReader& rTr, const std::string& rLabel = "", const Type* pContext=0);
1534 virtual void DoWrite( TokenWriter& rTw, const std::string& rLabel= "", const Type* pContext=0) const;
1571 static const char mDelim = ';';
1647 static TypeDefinition* Constructor( const std::string& rTypeName= "");
1693 const Type* Prototype( void) const;
1705 Type* NewObject( void) const;
1717 const std::string& ElementTag( void) const;
1725 void ElementTag( const std::string& rTag);
1736 const std::string& ElementType( void) const;
1744 void ElementType( const std::string& rEype);
1785 virtual void Prototype( Type* pType);
1804 virtual void DoRead( TokenReader& rTr, const std::string& rLabel = "", const Type* pContext=0);
1836 virtual void DoWrite( TokenWriter& rTw, const std::string& rLabel= "", const Type* pContext=0) const;
1880 FD_DRTI( "TypeDefinition::Construct<" << typeid(T).name() << ">(" << rTypeName << ")");
1893 FD_DRTI( "TypeDefinition::FromFile<" << typeid(T).name() << ">()");
1897 td-> Read(rFileName);
#define FAUDES_TYPE_DECLARATION(ftype, ctype, cbase)
void DoAssign(const AttrType &rSrc)
virtual bool IsDefault(void) const
bool DoEqual(const AttrType &rOther) const
static const Type * ConstPointer(const T *ptr)
static Type * Pointer(T *ptr)
static const Type * ConstPointer(const T *ptr)
static Type * Pointer(T *ptr)
virtual ~Documentation(void)
bool mApplicationRegistered
std::string mElementTagDef
std::string mFaudesTypeName
const TypeDefinition * pTypeDefinition
virtual ~TypeDefinition(void)
static TypeDefinition * FromFile(const std::string &rFileName)
TypeDefinition(const TypeDefinition &rOther)
static TypeDefinition * Constructor(const std::string &rTypeName="")
void Read(const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
static std::string msStringEmpty
static std::string msStringVoid
libFAUDES 2.33l
--- 2025.09.16
--- c++ api documentaion by doxygen
|