41 #include "../TaskContext.hpp" 42 #include "../plugin/ServicePlugin.hpp" 44 #include "rtt-config.h" 45 #if !defined(ORO_EMBEDDED) 46 #include "../OperationCaller.hpp" 54 using namespace detail;
58 parent->
provides()->addService( sp );
63 :
Service(
"marshalling", parent)
65 this->
doc(
"Property marshalling interface. Use this service to read and write properties from/to a file.");
67 .doc(
"Read, and create if necessary, Properties from a file.")
68 .arg(
"Filename",
"The file to read the (new) Properties from.");
71 .doc(
"Store properties in a file and overwrite any existing content.")
72 .arg(
"Filename",
"The file to write the Properties to.");
75 .doc(
"Read all Properties from a file. Returns false if one or more properties are missing or have a wrong type in that file.").arg(
"Filename",
"The file to read the Properties from.");
77 .doc(
"Read a single Property from a file.").arg(
"Name",
"The name of (or the path to) the property to read.").arg(
"Filename",
"The file to read the Properties from.");
80 .doc(
"Read some Properties from a file. Updates only matching properties. Returns false upon type mismatch.")
81 .arg(
"Filename",
"The file to read the Properties from.");
83 .doc(
"Write some Properties to a file, ie, only the ones that are already present in the file.").arg(
"Filename",
"The file to write the Properties to.");
86 .doc(
"Write all Properties to a file, but keep existing ones in that file.").arg(
"Filename",
"The file to write the Properties to.");
88 .doc(
"Write a single Property to a file and keep existing ones in that file.").arg(
"Name",
"The name of (or the path to) the property to write.").arg(
"Filename",
"The file to write the Properties to.");
91 .doc(
"Read, and create if necessary, Properties from a file.")
92 .arg(
"Filename",
"The file to read the (new) Properties from.")
93 .arg(
"Servicename",
"The Service to load the (new) Properties to.");
95 .doc(
"Store properties in a file and overwrite any existing content.")
96 .arg(
"Filename",
"The file to write the Properties to.")
97 .arg(
"Servicename",
"The Service store the Properties of.");
100 .doc(
"Read all Properties from a file. Returns false if one or more properties are missing or have a wrong type in that file.")
101 .arg(
"Filename",
"The file to read the Properties from.")
102 .arg(
"Servicename",
"The Service to load the Properties to.");
104 .doc(
"Read a single Property from a file.")
105 .arg(
"Name",
"The name of (or the path to) the property to read.")
106 .arg(
"Filename",
"The file to read the Property from.")
107 .arg(
"Servicename",
"The Service to load the Property to.");
110 .doc(
"Read some Properties from a file. Updates only matching properties. Returns false upon type mismatch.")
111 .arg(
"Filename",
"The file to read the Properties from.")
112 .arg(
"Servicename",
"The Service to update the Properties of.");
115 .doc(
"Write some Properties to a file, ie, only the ones that are already present in the file.")
116 .arg(
"Filename",
"The file to write the Properties to.")
117 .arg(
"Servicename",
"The Service to update the Properties of.");
120 .doc(
"Write all Properties to a file, but keep existing ones in that file.")
121 .arg(
"Filename",
"The file to write the Properties to.")
122 .arg(
"Servicename",
"The Service to write the Properties of.");
125 .doc(
"Write a single Property to a file and keep existing ones in that file.")
126 .arg(
"Name",
"The name of (or the path to) the property to write.")
127 .arg(
"Filename",
"The file to write the Properties to.")
128 .arg(
"Servicename",
"The Service to write the Property of.");
135 return pl.
load( filename );
141 return pl.
store( filename );
157 return pl.
save( filename,
true);
162 return pl.
save( filename,
false);
172 return pl.
save(filename, name);
184 return pl.
load( filename );
195 return pl.
store( filename );
226 return pl.
save( filename,
true);
236 return pl.
save( filename,
false);
256 return pl.
save(filename, name);
const std::string & getName() const
bool readServiceProperties(const std::string &filename, const std::string &servicename) const
bool updateServiceProperties(const std::string &filename, const std::string &servicename) const
Service::shared_ptr provides()
bool writeProperties(const std::string &filename) const
Service::shared_ptr provides()
bool configure(const std::string &filename, bool all=true) const
bool loadServiceProperties(const std::string &filename, const std::string &servicename) const
bool updateServiceFile(const std::string &filename, const std::string &servicename) const
bool load(const std::string &filename) const
#define ORO_SERVICE_NAMED_PLUGIN(SERVICE, NAME)
Operation< Signature > & addOperation(Operation< Signature > &op)
shared_ptr getParent() const
bool updateProperties(const std::string &filename) const
bool writeServiceProperties(const std::string &filename, const std::string &servicename) const
bool save(const std::string &filename, bool all=true) const
bool loadProperties(const std::string &filename) const
bool writeProperty(const std::string &name, const std::string &filename)
const std::string & doc() const
bool hasService(const std::string &service_name)
bool store(const std::string &filename) const
bool readProperty(const std::string &name, const std::string &filename)
bool storeServiceProperties(const std::string &filename, const std::string &servicename) const
bool readServiceProperty(const std::string &name, const std::string &filename, const std::string &servicename)
bool updateFile(const std::string &filename) const
bool writeServiceProperty(const std::string &name, const std::string &filename, const std::string &servicename)
bool readProperties(const std::string &filename) const
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
bool storeProperties(const std::string &filename) const
boost::shared_ptr< MarshallingService > shared_ptr
static Logger::LogFunction endlog()