C++ main module for gpm Package  1.0
GPM_ModelClassFactory.h
Go to the documentation of this file.
1 #ifndef GPM_ModelClassFactory_H
2 #define GPM_ModelClassFactory_H
3 
4 #include "GPM_ClassFactory.h"
5 
6 #include "GPM_Rule.h"
8 
15 
17 
18  // ATTRIBUTES
19 private:
20  // ASSOCIATIONS
21 
22  SP_OBJECT(GPM_ModelClassFactory);
23 
24 private:
25 
26 
27 
28 protected:
29 
32 
35  virtual ~GPM_ModelClassFactory(void);
36 
37 public:
38 
41  virtual SP::GPM_Rule newRule() const=0;
42 
45  virtual SP::GPM_Rule newRule(const tFlag& action,const tString& expr) const {
46  SP::GPM_Rule rule=newRule();
47  rule->setAction(action);
48  rule->setExpression(expr);
49  return rule;
50  }
53  virtual SP::GPM_CompositorFunction newFunction() const=0;
54 
57  virtual SP::GPM_CompositorFunction newFunction(const tString& name,
58  const vector<tString>& realParameters,
59  const tString& body) const=0;
62  virtual SP::GPM_CompositorFunction newFunction(const tString& name,
63  const vector<tString>& nameParameters,
64  const vector<tFlag>& typeParameters,
65  const vector<tFlag>& cardParameters,
66  const vector<tFlag>& isConstParameters,
67  const tString& body,
68  const tFlag& returnType) const=0;
71  virtual SP::GPM_CompositorFunction newFunction(const tString& stringFunction) const=0;
72 
73 
79  virtual SP::CORE_Object NewInstance(const tString& classname,
80  const SVC::CORE_Object& arguments) const;
81  virtual SP::CORE_Object NewInstance(const tString& classname) const {
82  SVC::CORE_Object args;
83  return NewInstance(classname,args);
84  }
85 
86 };
87 #endif
virtual SP::GPM_Rule newRule() const =0
new rule
virtual SP::GPM_CompositorFunction newFunction() const =0
create a new function
DEFINE_SPTR(GPM_ModelClassFactory)
virtual ~GPM_ModelClassFactory(void)
destroy an object.
Definition: GPM_ModelClassFactory.cpp:12
GPM_ModelClassFactory(void)
create a dynamical system
Definition: GPM_ModelClassFactory.cpp:8
virtual SP::CORE_Object NewInstance(const tString &classname) const
create an instance of a class
Definition: GPM_ModelClassFactory.h:81
virtual SP::GPM_Rule newRule(const tFlag &action, const tString &expr) const
new rule
Definition: GPM_ModelClassFactory.h:45
This class is the class to save GPM classes.
Definition: GPM_ModelClassFactory.h:16
This class is the class to save GPM classes.
Definition: GPM_ClassFactory.h:13
#define tString
Definition: types.h:36
virtual SP::CORE_Object NewInstance(const tString &classname, const SVC::CORE_Object &arguments) const
create a new instance of class
Definition: GPM_ModelClassFactory.cpp:18
#define tFlag
Definition: types.h:14