35 #ifndef ANA_FUSION_FUSIONFACTORY_H
36 #define ANA_FUSION_FUSIONFACTORY_H
65 virtual int canFusion(
const std::set<AObject *> & ) = 0;
69 virtual std::string
ID()
const = 0;
91 bool allowreorder =
false );
94 virtual std::multimap<int, std::string>
Base Anatomist object (abstract)
Handles creation of various fusion objects.
static bool registerMethod(FusionMethod *method)
returns false if the method was already registered
virtual FusionMethod * chooseMethod(const std::set< AObject * > &)
Chooses one method which can fusion these objects.
static std::set< FusionMethod * > _methods
virtual std::multimap< int, std::string > allowedMethods(const std::set< AObject * > &) const
lists all possible fusions on the given objects, classed with a priority
virtual FusionMethod * chooseMethod(std::vector< AObject * > &, bool allowreorder=false)
static FusionFactory * factory()
virtual FusionMethod * method(const std::string &name) const
Selects the method with ID name (if any)
static bool canFusion(const std::set< AObject * > &)
is there at least one method which can actually make a fusion with these objects ?
static FusionFactory * _theFactory
static std::set< std::string > methods()
virtual bool orderingMatters() const
virtual AObject * fusion(const std::vector< AObject * > &)=0
creates the fusion
virtual std::string generatedObjectType() const =0
virtual std::string ID() const =0
identifier for the method
virtual int canFusion(const std::set< AObject * > &)=0
returns 0 if fusion is not possible on the given objects, or a positive number if it is allowed.