Program: bbtk
Module: $RCSfile: bbtkPackage.h,v $
Language: C++
- Date: $Date: 2008/03/07 08:40:14 $
- Version: $Revision: 1.5 $
+ Date: $Date: 2008/04/08 06:59:30 $
+ Version: $Revision: 1.6 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See doc/license.txt or
BlackBox* NewBlackBox(const std::string& type,
const std::string& name) const;
- BlackBox* NewAdaptor(TypeInfo typein,
- TypeInfo typeout,
- const std::string& name) const;
+ BlackBox* NewAdaptor(const DataInfo& typein,
+ const DataInfo& typeout,
+ const std::string& name) const;
+
+ BlackBox* NewWidgetAdaptor(const DataInfo& typein,
+ const DataInfo& typeout,
+ const std::string& name) const;
+ bool FindAdaptor(const DataInfo& typein,
+ const DataInfo& typeout,
+ std::string& adaptor) const;
+ bool FindWidgetAdaptor(const DataInfo& typein,
+ const DataInfo& typeout,
+ std::string& adaptor) const;
bool RegisterBlackBox(BlackBoxDescriptor*);
void UnRegisterBlackBox(const std::string& name);
class AdaptorKey
{
public:
- AdaptorKey( TypeInfo typein, TypeInfo typeout)
- : mTypeIn(typein.name()), mTypeOut(typeout.name()) {}
+ AdaptorKey( const DataInfo& typein, const DataInfo& typeout,
+ BlackBoxDescriptor::Kind kind )
+ : mTypeIn(typein), mTypeOut(typeout), mKind(kind) {}
bool operator< ( const AdaptorKey& k ) const
{
- // return ( ( mTypeIn.before(k.mTypeIn) ) ||
- // ( ( mTypeIn == k.mTypeIn ) &&
- // ( mTypeOut.before(k.mTypeOut) ) ) );
- return ( ( mTypeIn < k.mTypeIn ) ||
- ( ( mTypeIn == k.mTypeIn ) &&
- ( mTypeOut < k.mTypeOut ) ) );
+ return ( ( mKind < k.mKind ) ||
+ ( ( mKind == k.mKind ) &&
+ ( ( mTypeIn < k.mTypeIn ) ||
+ ( ( mTypeIn == k.mTypeIn ) &&
+ ( mTypeOut < k.mTypeOut ) ) ) ) );
}
private:
- // TypeInfo mTypeIn;
- // TypeInfo mTypeOut;
- std::string mTypeIn;
- std::string mTypeOut;
+ DataInfo mTypeIn;
+ DataInfo mTypeOut;
+ BlackBoxDescriptor::Kind mKind;
};
/// The type of map of adaptor descriptors