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) ;
240 void set(
Property const &p,
Value val, std::string
const &unit);
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 bool isThreadSafe() const
Whether this class is thread-safe.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
virtual ~Object()
Virtual destructor.
void help() const
Print (to stdout) some help on this class.
Reference-counting pointers.
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
virtual void setParameters(Gyoto::FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
std::vector< std::string > plugins_
The plug-ins that needs to be loaded to access this instance's class.
Definition: GyotoObject.h:172
Compile-time configuration.
Property const * property(std::string const pname) const
Find property by name.
Property that can be set and got using standard methods.
Definition: GyotoProperty.h:607
Object()
Default constructor.
std::string describeProperty(Gyoto::Property const &p) const
Format desrciption for a property.
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:162
Object with properties.
Definition: GyotoObject.h:151
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
virtual void fillElement(Gyoto::FactoryMessenger *fmp) const
Fill the XML element for this Object.