/*========================================================================= Program: bbtk Module: $RCSfile: bbtkBlackBoxOutputDescriptor.h,v $ Language: C++ Date: $Date: 2008/01/22 15:02:00 $ Version: $Revision: 1.1.1.1 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ /** * \file * \brief Class bbtk::BlackBoxOutputDescriptor : abstract descriptor of an output of a black box (stores a name, a description and type) */ /** * \class bbtk::BlackBoxOutputDescriptor * \brief Abstract descriptor of an output of a black box (stores a name, a description and type) */ #ifndef __bbtkBlackBoxOutputDescriptor_h__ #define __bbtkBlackBoxOutputDescriptor_h__ #include "bbtkSystem.h" #include "bbtkData.h" #include "bbtkRTTI.h" namespace bbtk { class BBTK_EXPORT BlackBoxOutputDescriptor { public: /// Ctor with name and description BlackBoxOutputDescriptor( const std::string& name, const std::string& description, bool copy_construct = true) : mName(name), mDescription(description), mCopyConstruct(copy_construct) {} /// Returns the name of the output const std::string& GetName() const { return mName; } /// Returns the description of the output const std::string& GetDescription() const { return mDescription; } /// Returns the type of the output virtual TypeInfo GetTypeInfo() const = 0; /// Returns the name of the type of the output virtual std::string GetTypeName() const = 0; /// Returns the name of the type of the output virtual std::string GetHumanTypeName() const = 0; /// Returns true iff the type is a pointer to class virtual bool IsPointerType() const = 0; /// Returns true iff the input must be copied /// by the copy constructor of the box bool GetCopyConstruct() const { return mCopyConstruct; } private: /// Default ctor is private BlackBoxOutputDescriptor() : mName(""), mDescription("") {} /// The name of the output std::string mName; /// The description of the output std::string mDescription; /// Does the output has to be copied by copy constructor /// default = true. Must be set to false if it is /// initialized by the user in bbUserCopyConstructor /// (typically if it is a pointer) bool mCopyConstruct; }; } // namespace bbtk #endif