/*========================================================================= Program: bbtk Module: $RCSfile: bbtkUserBlackBoxInputDescriptor.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::UserBlackBoxInputDescriptor : structure containing the description of a UserBlackBox input (name, description, type, functor) */ /** * \class bbtk::UserBlackBoxInputDescriptor * \brief Structure containing the description of a UserBlackBox input (name, description, type, functor) */ #ifndef __bbtkUserBlackBoxInputDescriptor_h__ #define __bbtkUserBlackBoxInputDescriptor_h__ #include "bbtkBlackBoxInputDescriptor.h" #include "bbtkUserBlackBoxGetSetFunctor.h" #include namespace bbtk { class BBTK_EXPORT UserBlackBoxInputDescriptor : public bbtk::BlackBoxInputDescriptor { public: //typedef enum { // MANDATORY, // OPTIONAL //} InputType; UserBlackBoxInputDescriptor( const std::string& name, const std::string& description, UserBlackBoxGetFunctor* getfunctor, UserBlackBoxSetFunctor* setfunctor, bool copy_construct = true); ~UserBlackBoxInputDescriptor(); /// Returns the type of the input TypeInfo GetTypeInfo() const { return mGetFunctor->GetTypeInfo(); } /// Returns the name of the type of the input std::string GetTypeName() const { return mGetFunctor->GetTypeName(); } /// Returns the name of the type of the input std::string GetHumanTypeName() const { return mGetFunctor->GetHumanTypeName(); } /// Returns true iff the type is a pointer to class virtual bool IsPointerType() const { return mGetFunctor->IsPointerType(); } /// Returns the functor on the Get method UserBlackBoxGetFunctor* GetGetFunctor() { return mGetFunctor; } /// Returns the functor on the Set method UserBlackBoxSetFunctor* GetSetFunctor() { return mSetFunctor; } private: /// Default ctor is private UserBlackBoxInputDescriptor() : BlackBoxInputDescriptor("","") {} /// The functor on the Get method UserBlackBoxGetFunctor* mGetFunctor; /// The functor on the Set method UserBlackBoxSetFunctor* mSetFunctor; }; } // namespace bbtk #endif