bbtkBlackBoxInputOutputDescriptor.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00041 #ifndef __bbtkBlackBoxInputOutputDescriptor_h__
00042 #define __bbtkBlackBoxInputOutputDescriptor_h__
00043
00044 #include "bbtkSystem.h"
00045 #include "bbtkData.h"
00046 #include "bbtkRTTI.h"
00047
00048
00049 namespace bbtk
00050 {
00051 class BBTK_EXPORT BlackBoxInputOutputDescriptor
00052 {
00053 public:
00055 BlackBoxInputOutputDescriptor(TypeInfo creator_type_info,
00056 const std::string& name,
00057 const std::string& description,
00058 const std::string& nature,
00059 bool copy_construct = true
00060 )
00061 : mCreatorTypeInfo(creator_type_info),
00062 mName(name),
00063 mDescription(description),
00064 mNature(nature),
00065 mCopyConstruct(copy_construct)
00066 {}
00068 virtual ~BlackBoxInputOutputDescriptor() {}
00069
00071 TypeInfo GetCreatorTypeInfo() const { return mCreatorTypeInfo; }
00073 const std::string& GetName() const { return mName; }
00075 const std::string& GetDescription() const { return mDescription; }
00077 const std::string& GetNature() const { return mNature; }
00079 virtual TypeInfo GetTypeInfo() const = 0;
00081 virtual std::string GetTypeName() const = 0;
00083 virtual DataInfo GetDataInfo() const
00084 { return DataInfo(this->GetTypeInfo(),mNature); }
00086 virtual std::string GetHumanTypeName() const = 0;
00088 virtual bool IsPointerType() const = 0;
00091 bool GetCopyConstruct() const { return mCopyConstruct; }
00092
00093 protected:
00095 BlackBoxInputOutputDescriptor() : mCreatorTypeInfo(typeid(void)),
00096 mName(""), mDescription(""),
00097 mNature(""),
00098 mCopyConstruct(true)
00099 {}
00100 private:
00101
00103 TypeInfo mCreatorTypeInfo;
00105 std::string mName;
00107 std::string mDescription;
00109 std::string mNature;
00114 bool mCopyConstruct;
00115 };
00116
00117 }
00118
00119 #endif