X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkBlackBoxInputOutputDescriptor.h;h=fc2f97e91111929e348b1c429dec88a04605fb1f;hb=bdbe8432a23b398ce457f38d647e9298a7cf560a;hp=4560950cc110ff5d31f9adc178460c06cf88b284;hpb=981ac411655ee59f6cf7a6e89099a4366ac4b18b;p=bbtk.git diff --git a/kernel/src/bbtkBlackBoxInputOutputDescriptor.h b/kernel/src/bbtkBlackBoxInputOutputDescriptor.h index 4560950..fc2f97e 100644 --- a/kernel/src/bbtkBlackBoxInputOutputDescriptor.h +++ b/kernel/src/bbtkBlackBoxInputOutputDescriptor.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkBlackBoxInputOutputDescriptor.h,v $ Language: C++ - Date: $Date: 2008/04/04 08:04:05 $ - Version: $Revision: 1.1 $ + Date: $Date: 2008/04/08 06:59:29 $ + Version: $Revision: 1.2 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -18,11 +18,11 @@ /** * \file - * \brief Class bbtk::BlackBoxInputOutputDescriptor : abstract descriptor of an input or an output of a black box (has a name, a description and type) + * \brief Class bbtk::BlackBoxInputOutputDescriptor : abstract descriptor of an input or an output of a black box (has a name, description, type and nature) */ /** * \class bbtk::BlackBoxInputOutputDescriptor - * \brief Abstract descriptor of an input or an output of a black box (has a name, a description and type) + * \brief Abstract descriptor of an input or an output of a black box (has a name, description, type and nature) */ #ifndef __bbtkBlackBoxInputOutputDescriptor_h__ @@ -42,23 +42,31 @@ namespace bbtk BlackBoxInputOutputDescriptor(TypeInfo creator_type_info, const std::string& name, const std::string& description, - bool copy_construct = true) + const std::string& nature, + bool copy_construct = true + ) : mCreatorTypeInfo(creator_type_info), mName(name), mDescription(description), + mNature(nature), mCopyConstruct(copy_construct) {} /// Returns the TypeInfo of the BlackBoxDescriptor which created this descriptor - TypeInfo GetCreatorTypeInfo() { return mCreatorTypeInfo; } + TypeInfo GetCreatorTypeInfo() const { return mCreatorTypeInfo; } /// Returns the name of the in/output const std::string& GetName() const { return mName; } /// Returns the description of the in/output const std::string& GetDescription() const { return mDescription; } + /// Returns the nature of the in/output + const std::string& GetNature() const { return mNature; } /// Returns the type of the in/output virtual TypeInfo GetTypeInfo() const = 0; /// Returns the name of the type of the in/output virtual std::string GetTypeName() const = 0; + /// Returns the DataInfo of the input (Type+Nature) + virtual DataInfo GetDataInfo() const + { return DataInfo(this->GetTypeInfo(),mNature); } /// Returns the name of the type of the in/output virtual std::string GetHumanTypeName() const = 0; /// Returns true iff the type is a pointer to class @@ -71,6 +79,7 @@ namespace bbtk /// Default ctor is reserved to children BlackBoxInputOutputDescriptor() : mCreatorTypeInfo(typeid(void)), mName(""), mDescription(""), + mNature(""), mCopyConstruct(true) {} private: @@ -81,6 +90,8 @@ namespace bbtk std::string mName; /// The description of the input/output std::string mDescription; + /// The nature of the input/output + std::string mNature; /// Does the in/output has to be copied by copy constructor /// default = true. Must be set to false if it is /// initialized by the user in bbUserCopyConstructor