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;
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
246 void set(std::string
const &pname,
Value val, std::string
const &unit);
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);
Compile-time configuration.
#define GYOTO_OBJECT
Declare class::properties and class::getProperties()
Definition: GyotoObject.h:84
Reference-counting pointers.
Factory / SmartPointee::Subcontractor_t interface.
Definition: GyotoFactoryMessenger.h:92
Object with properties.
Definition: GyotoObject.h:152
std::vector< std::string > plugins_
The plug-ins that needs to be loaded to access this instance's class.
Definition: GyotoObject.h:172
virtual bool isThreadSafe() const
Whether this class is thread-safe.
Value get(Property const &p) const
Get Value of a Property.
virtual void fillElement(Gyoto::FactoryMessenger *fmp) const
Fill the XML element for this Object.
virtual void fillProperty(Gyoto::FactoryMessenger *fmp, Property const &p) const
Output a single Property to XML.
void help() const
Print (to stdout) some help on this class.
void set(Property const &p, Value val)
Set Value of a Property.
Object(Object const &orig)
Deep copy constructor.
void set(std::string const &pname, Value val)
Set Value of a Property.
Value get(std::string const &pname) const
Get Value of a Property.
virtual void setParameter(Gyoto::Property const &p, std::string const &name, std::string const &content, std::string const &unit)
Set parameter by Property (and name)
virtual int setParameter(std::string name, std::string content, std::string unit)
Set parameter by name.
void set(Property const &p, Value val, std::string const &unit)
Set Value (expressed in unit) of a Property.
Object(std::string const &kind)
Constructor setting kind.
Object()
Default constructor.
std::string describeProperty(Gyoto::Property const &p) const
Format desrciption for a property.
Value get(Property const &p, std::string const &unit) const
Get Value of a Property, converted to unit.
virtual void setParameters(Gyoto::FactoryMessenger *fmp)
Main loop for parsing Properties from XML description.
virtual ~Object()
Virtual destructor.
void set(std::string const &pname, Value val, std::string const &unit)
Set Value (expressed in unit) of a Property.
std::string kind_
The "kind" that is output in the XML entity.
Definition: GyotoObject.h:162
Property const * property(std::string const pname) const
Find property by name.
Value get(std::string const &pname, std::string const &unit) const
Get Value of a Property, converted to unit.
Property that can be set and got using standard methods.
Definition: GyotoProperty.h:608
Container for the value of a Property.
Definition: GyotoValue.h:60
Namespace for the Gyoto library.
Definition: GyotoAstrobj.h:43