26 #ifndef __GyotoObject_H_ 27 #define __GyotoObject_H_ 37 class FactoryMessenger;
46 #define GYOTO_OBJECT_ACCESSORS_STRING(method) \ 47 virtual void method(std::string const&); \ 48 virtual std::string method() const; 59 #define GYOTO_OBJECT_ACCESSORS(type, method) \ 60 virtual void method(type); \ 61 virtual type method() const; 69 #define GYOTO_OBJECT_ACCESSORS_UNIT(method) \ 70 GYOTO_OBJECT_ACCESSORS(double, method) \ 71 virtual void method(double, std::string const &); \ 72 virtual double method(std::string const &) const; 83 #define GYOTO_OBJECT \ 84 static Property const properties[]; \ 85 virtual Property const * getProperties() const 173 Object (std::string
const &kind) ;
189 void set(
Property const &p,
Value val, std::string
const &unit);
192 void set(std::string
const &pname,
Value val);
195 void set(std::string
const &pname,
Value val, std::string
const &unit);
201 Value get(std::string
const &pname)
const;
207 Value get(std::string
const &pname, std::string
const &unit)
const;
218 #ifdef GYOTO_USE_XERCES 265 virtual void fillElement(Gyoto::FactoryMessenger *fmp)
const ;
376 std::string
const &name,
377 std::string
const &content,
378 std::string
const &unit);
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:83
virtual ~Object()
Virtual destructor.
virtual void setParameters(Gyoto::FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
Property const * property(std::string const pname) const
Find property by name.
Compile-time configuration.
Property that can be set and got using standard methods.
Definition: GyotoProperty.h:313
virtual void fillElement(Gyoto::FactoryMessenger *fmp) const
Fill the XML element for this Object.
Object()
Default constructor.
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
Container for the value of a Property.
Definition: GyotoValue.h:60
std::string kind_
The "kind" that is output in the XML entity.
Definition: GyotoObject.h:147
Object with properties.
Definition: GyotoObject.h:136
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.