Go to the documentation of this file.
26 #ifndef __GyotoObject_H_
27 #define __GyotoObject_H_
38 class FactoryMessenger;
47 #define GYOTO_OBJECT_ACCESSORS_STRING(method) \
48 virtual void method(std::string const&); \
49 virtual std::string method() const;
60 #define GYOTO_OBJECT_ACCESSORS(type, method) \
61 virtual void method(type); \
62 virtual type method() const;
70 #define GYOTO_OBJECT_ACCESSORS_UNIT(method) \
71 GYOTO_OBJECT_ACCESSORS(double, method) \
72 virtual void method(double, std::string const &); \
73 virtual double method(std::string const &) const;
84 #define GYOTO_OBJECT \
85 static Property const properties[]; \
86 virtual Property const * getProperties() const; \
87 static const std::string builtinPluginValue; \
88 virtual void plugins(std::vector<std::string> const & plugname); \
89 virtual std::vector<std::string> plugins() const
99 #define GYOTO_OBJECT_THREAD_SAFETY \
100 virtual bool isThreadSafe() const
224 Object (std::string
const &kind) ;
243 void set(std::string
const &pname,
Value val);
246 void set(std::string
const &pname,
Value val, std::string
const &unit);
252 Value get(std::string
const &pname)
const;
258 Value get(std::string
const &pname, std::string
const &unit)
const;
269 #ifdef GYOTO_USE_XERCES
427 std::string
const &name,
428 std::string
const &content,
429 std::string
const &unit);
virtual void fillElement(Gyoto::FactoryMessenger *fmp) const
Fill the XML element for this Object.
void set(Property const &p, Value val)
Set Value of a Property.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Value get(Property const &p) const
Get Value of a Property.
Reference-counting pointers.
void help() const
Print (to stdout) some help on this class.
virtual ~Object()
Virtual destructor.
Object with properties.
Definition: GyotoObject.h:151
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
virtual void setParameters(Gyoto::FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
Container for the value of a Property.
Definition: GyotoValue.h:60
std::vector< std::string > plugins_
The plug-ins that needs to be loaded to access this instance's class.
Definition: GyotoObject.h:172
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
Object()
Default constructor.
std::string describeProperty(Gyoto::Property const &p) const
Format desrciption for a property.
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
Property that can be set and got using standard methods.
Definition: GyotoProperty.h:607
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
std::string kind_
The "kind" that is output in the XML entity.
Definition: GyotoObject.h:162
const Property * property(std::string const pname) const
Find property by name.
virtual bool isThreadSafe() const
Whether this class is thread-safe.
Compile-time configuration.