|
Go to the documentation of this file.
23 #ifndef FAUDES_RTITYPES_H
24 #define FAUDES_RTITYPES_H
174 class TypeDefinition;
299 virtual void Clear( void);
357 virtual bool Equal( const Type& rOther) const;
403 virtual void Name( const std::string& rName);
413 virtual const std::string& Name( void) const;
424 void Write( const Type* pContext=0) const;
443 void Write( const std::string& pFileName, const std::string& rLabel= "",
444 const Type* pContext=0, std::ios::openmode openmode = std::ios::out|std::ios::trunc) const;
459 void Write( const std::string& pFileName, std::ios::openmode openmode) const;
494 virtual void XWrite( const std::string& pFileName, const std::string& rLabel= "",
495 const Type* pContext=0) const;
539 std::string ToString( const std::string& rLabel= "", const Type* pContext=0) const;
557 std::string ToText( const std::string& rLabel= "", const Type* pContext=0) const;
587 void DWrite( const std::string& pFileName, const std::string& rLabel= "",
588 const Type* pContext=0, std::ios::openmode openmode = std::ios::out|std::ios::trunc) const;
638 std::string ToSText( void) const;
656 void Read( const std::string& rFileName, const std::string& rLabel = "", const Type* pContext=0);
673 void FromString( const std::string& rString, const std::string& rLabel= "", const Type* pContext=0);
838 virtual const std::string& TypeName( void) const;
852 virtual Token XBeginTag( const std::string& rLabel= "", const std::string& rFallbackLabel= "") const;
867 #define FAUDES_TYPE_DECLARATION_NEW(ftype,ctype,cbase) \
868 public: virtual ctype* New(void) const;
869 #define FAUDES_TYPE_DECLARATION_COPY(ftype,ctype,cbase) \
870 public: virtual ctype* Copy(void) const;
871 #define FAUDES_TYPE_DECLARATION_CAST(ftype,ctype,cbase) \
872 public: virtual const Type* Cast(const Type* pOther) const;
873 #define FAUDES_TYPE_DECLARATION_ASSIGN(ftype,ctype,cbase) \
874 public: virtual ctype& Assign(const Type& rSrc);
875 #define FAUDES_TYPE_DECLARATION_EQUAL(ftype,ctype,cbase) \
876 public: virtual bool Equal(const Type& rOther) const; \
877 public: virtual ctype& operator=(const ctype& rSrc); \
878 public: virtual bool operator==(const ctype& rOther) const; \
879 public: virtual bool operator!=(const ctype& rOther) const;
882 #define FAUDES_TYPE_DECLARATION(ftype,ctype,cbase) \
884 virtual ctype* New(void) const; \
885 virtual ctype* Copy(void) const; \
886 virtual const Type* Cast(const Type* pOther) const; \
887 virtual ctype& Assign(const Type& rSrc); \
888 virtual bool Equal(const Type& rOther) const; \
889 virtual ctype& operator=(const ctype& rSrc); \
890 virtual bool operator==(const ctype& rOther) const; \
891 virtual bool operator!=(const ctype& rOther) const;
894 #define FAUDES_TYPE_TDECLARATION(ftype,ctype,cbase) \
896 virtual ctype* New(void) const; \
897 virtual ctype* Copy(void) const; \
898 virtual const Type* Cast(const Type* pOther) const; \
899 virtual ctype& Assign(const Type& rSrc); \
900 virtual bool Equal(const Type& rOther) const; \
901 virtual ctype& operator=(const ctype& rSrc); \
902 virtual bool operator==(const ctype& rOther) const; \
903 virtual bool operator!=(const ctype& rOther) const;
906 #define FAUDES_TYPE_IMPLEMENTATION_NEW(ftype,ctype,cbase) \
907 ctype* ctype::New(void) const { \
908 return new ctype(); }
909 #define FAUDES_TYPE_IMPLEMENTATION_COPY(ftype,ctype,cbase) \
910 ctype* ctype::Copy(void) const { \
911 return new ctype(*this); }
912 #define FAUDES_TYPE_IMPLEMENTATION_CAST(ftype,ctype,cbase) \
913 const Type* ctype::Cast(const Type* pOther) const { \
914 return dynamic_cast<const ctype*>(pOther); }
915 #define FAUDES_TYPE_IMPLEMENTATION_ASSIGN(ftype,ctype,cbase) \
916 ctype& ctype::Assign(const Type& rSrc) { \
917 if(const ctype* csattr=dynamic_cast<const ctype*>(&rSrc)) { \
918 this->Clear(); DoAssign(*csattr);} \
920 cbase::Assign(rSrc);}; \
922 ctype& ctype::operator=(const ctype& rSrc) { this->Clear(); DoAssign(rSrc); return *this; }
923 #define FAUDES_TYPE_IMPLEMENTATION_EQUAL(ftype,ctype,cbase) \
924 bool ctype::Equal(const Type& rOther) const { \
925 if(&rOther==this) return true; \
926 if(typeid(rOther) != typeid(*this)) return false; \
927 const ctype* csattr=dynamic_cast<const ctype*>(&rOther); \
928 if(!csattr) return false; \
929 if(!DoEqual(*csattr)) return false; \
931 bool ctype::operator==(const ctype& rOther) const { return DoEqual(rOther); } \
932 bool ctype::operator!=(const ctype& rOther) const { return !DoEqual(rOther); }
936 #define FAUDES_TYPE_IMPLEMENTATION(ftype,ctype,cbase) \
937 ctype* ctype::New(void) const { \
938 return new ctype(); } \
939 ctype* ctype::Copy(void) const { \
940 return new ctype(*this); } \
941 const Type* ctype::Cast(const Type* pOther) const { \
942 return dynamic_cast<const ctype*>(pOther); } \
943 ctype& ctype::Assign(const Type& rSrc) { \
944 if(const ctype* csattr=dynamic_cast<const ctype*>(&rSrc)) \
945 { this->Clear(); DoAssign(*csattr); return *this;} \
946 cbase::Assign(rSrc); \
948 ctype& ctype::operator=(const ctype& rSrc) { this->Clear(); DoAssign(rSrc); return *this;} \
949 bool ctype::Equal(const Type& rOther) const { \
950 if(&rOther==this) return true; \
951 if(typeid(rOther) != typeid(*this)) return false; \
952 const ctype* csattr=dynamic_cast<const ctype*>(&rOther); \
953 if(!csattr) return false; \
954 if(!DoEqual(*csattr)) return false; \
956 bool ctype::operator==(const ctype& rOther) const { return DoEqual(rOther); } \
957 bool ctype::operator!=(const ctype& rOther) const { return !DoEqual(rOther); }
963 #define FAUDES_TYPE_TIMPLEMENTATION_NEW(ftype,ctype,cbase,ctemp) \
964 ctemp ctype* ctype::New(void) const { \
965 return new ctype(); }
966 #define FAUDES_TYPE_TIMPLEMENTATION_COPY(ftype,ctype,cbase,ctemp) \
967 ctemp ctype* ctype::Copy(void) const { \
968 return new ctype(*this); }
969 #define FAUDES_TYPE_TIMPLEMENTATION_CAST(ftype,ctype,cbase,ctemp) \
970 ctemp const Type* ctype::Cast(const Type* pOther) const { \
971 return dynamic_cast<const ctype*>(pOther);}
972 #define FAUDES_TYPE_TIMPLEMENTATION_ASSIGN(ftype,ctype,cbase,ctemp) \
973 ctemp ctype& ctype::Assign(const Type& rSrc) { \
974 if(const ctype* csattr=dynamic_cast<const ctype*>(&rSrc)) { \
975 this->Clear(); DoAssign(*csattr); return *this;} \
976 cbase::Assign(rSrc); \
978 ctemp ctype& ctype::operator=(const ctype& rSrc) { this->Clear(); DoAssign(rSrc); return *this; }
979 #define FAUDES_TYPE_TIMPLEMENTATION_EQUAL(ftype,ctype,cbase,ctemp) \
980 ctemp bool ctype::Equal(const Type& rOther) const { \
981 if(&rOther==this) return true; \
982 if(typeid(rOther) != typeid(*this)) return false; \
983 const ctype* csattr=dynamic_cast<const ctype*>(&rOther); \
984 if(!csattr) return false; \
985 if(!this->DoEqual(*csattr)) return false; \
987 ctemp bool ctype::operator==(const ctype& rOther) const { return this->DoEqual(rOther); } \
988 ctemp bool ctype::operator!=(const ctype& rOther) const { return !this->DoEqual(rOther); }
992 #define FAUDES_TYPE_TIMPLEMENTATION(ftype,ctype,cbase,ctemp) \
993 ctemp ctype* ctype::New(void) const { \
994 return new ctype(); } \
995 ctemp ctype* ctype::Copy(void) const { \
996 return new ctype(*this); } \
997 ctemp const Type* ctype::Cast(const Type* pOther) const { \
998 return dynamic_cast<const ctype*>(pOther);} \
999 ctemp ctype& ctype::Assign(const Type& rSrc) { \
1000 if(const ctype* csattr=dynamic_cast<const ctype*>(&rSrc)) \
1001 { this->Clear(); DoAssign(*csattr); return *this;} \
1002 cbase::Assign(rSrc); \
1004 ctemp ctype& ctype::operator=(const ctype& rSrc) { this->Clear(); DoAssign(rSrc); return *this; } \
1005 ctemp bool ctype::Equal(const Type& rOther) const { \
1006 if(&rOther==this) return true; \
1007 if(typeid(rOther) != typeid(*this)) return false; \
1008 const ctype* csattr=dynamic_cast<const ctype*>(&rOther); \
1009 if(!csattr) return false; \
1010 if(!this->DoEqual(*csattr)) return false; \
1012 ctemp bool ctype::operator==(const ctype& rOther) const { return this->DoEqual(rOther); } \
1013 ctemp bool ctype::operator!=(const ctype& rOther) const { return !this->DoEqual(rOther); }
1088 const std::string& Name( void) const;
1097 const std::string& PlugIn( void) const;
1105 const std::string& CType( void) const;
1111 const std::string& TextDoc( void) const;
1117 const std::string& HtmlDoc( void) const;
1123 const std::string& Keywords( void) const;
1135 std::string MatchKeyword( const std::string& rPattern) const;
1195 void Name( const std::string& name);
1203 void PlugIn( const std::string& plugin);
1211 void CType( const std::string& name);
1219 void TextDoc( const std::string& textdoc);
1247 void HtmlDoc( const std::string& fname);
1255 void AddKeyword( const std::string& rKeyword);
1651 FD_DRTI( "TypeDefinition::Construct<" << typeid(T).name() << ">(" << rTypeName << ")");
1659 FD_DRTI( "TypeDefinition::FromFile<" << typeid(T).name() << ">()");
1663 td-> Read(rFileName);
libFAUDES 2.24g
--- 2014.09.15
--- c++ api documentaion by doxygen
|