70 #include "ConfigurationInterfaceC.h" 74 #include "../../PropertyBag.hpp" 75 #include "../../Property.hpp" 76 #include "../../rtt-detail-fwd.hpp" 84 :mar (ar), mbag(0), mpoa( PortableServer::POA::_duplicate(the_poa))
89 :
mar (0),
mbag(bag),
mpoa( PortableServer::POA::_duplicate(the_poa))
95 return PortableServer::POA::_duplicate(
mpoa);
127 ::RTT::corba::CConfigurationInterface::CAttributeNames_var ret = new ::RTT::corba::CConfigurationInterface::CAttributeNames();
131 ret->length( names.size() );
132 for(
size_t i=0; i != names.size(); ++i)
135 ret[i].name = CORBA::string_dup( names[i].c_str() );
136 ret[i].type_name = CORBA::string_dup( ds->getTypeName().c_str() );
137 ret[i].assignable = ds->isAssignable();
145 ::RTT::corba::CConfigurationInterface::CPropertyNames_var ret = new ::RTT::corba::CConfigurationInterface::CPropertyNames();
152 ret->length( allprops.size() );
153 vector<string>::iterator it = allprops.begin();
154 vector<string>::iterator dit = alldescs.begin();
156 for( ; it != allprops.end(); ++it, ++index, ++dit) {
157 ::RTT::corba::CConfigurationInterface::CProperty prop;
158 prop.name = CORBA::string_dup( it->c_str() );
159 prop.description = CORBA::string_dup( dit->c_str() );
170 return new CORBA::Any();
172 const TypeInfo* ti = ds->getTypeInfo();
177 }
catch(std::exception
const& e) {
178 throw StdException(e.what());
184 const ::CORBA::Any & value)
189 const TypeInfo* ti = ds->getTypeInfo();
201 return new CORBA::Any();
204 log(
Error) <<
"CConfigurationInterface: no such property: " << name <<
". Returning empty CORBA::Any."<<
endlog();
205 return new CORBA::Any();
207 const TypeInfo* ti = ds->getTypeInfo();
212 }
catch(std::exception
const& e) {
213 throw StdException(e.what());
219 const ::CORBA::Any & value)
226 const TypeInfo* ti = ds->getTypeInfo();
250 return CORBA::string_dup( ds->getType().c_str() );
251 return CORBA::string_dup(
"na" );
259 return CORBA::string_dup( ds->getTypeName().c_str() );
260 return CORBA::string_dup(
"na" );
268 std::string result = ds->toString();
269 return CORBA::string_dup( result.c_str() );
271 return CORBA::string_dup(
"na" );
275 const char* name,
const char* value
281 if ( ds->getTypeInfo()->fromString( value, ds ) ) {
299 return CORBA::string_dup( ds->getType().c_str() );
300 return CORBA::string_dup(
"na" );
308 return CORBA::string_dup( ds->getTypeName().c_str() );
309 return CORBA::string_dup(
"na" );
317 std::string result = ds->toString();
318 return CORBA::string_dup( result.c_str() );
320 return CORBA::string_dup(
"na" );
324 const char* name,
const char* value
330 if ( ds->getTypeInfo()->fromString( value, ds ) ) {
bool hasAttribute(const std::string &name) const
virtual ::CORBA::Boolean setAttribute(const char *name, const ::CORBA::Any &value)
virtual ::CORBA::Any * getAttribute(const char *name)
RTT::ConfigurationInterface * mar
virtual ::RTT::corba::CConfigurationInterface::CPropertyNames * getPropertyList(void)
PropertyBag * properties()
virtual CORBA::Any_ptr createAny(base::DataSourceBase::shared_ptr source) const =0
virtual ::RTT::corba::CConfigurationInterface::CAttributeNames * getAttributeList(void)
virtual char * getPropertyTypeName(const char *name)
A container for holding references to properties.
virtual DataSourceBase::shared_ptr getDataSource() const =0
PropertyBase * findProperty(const PropertyBag &bag, const std::string &nameSequence, const std::string &separator)
virtual ::CORBA::Any * getProperty(const char *name)
PortableServer::POA_ptr _default_POA()
CORBA::Boolean hasProperty(const char *name)
base::AttributeBase * getValue(const std::string &name) const
virtual char * attributeToString(const char *name)
::RTT::base::DataSourceBase::shared_ptr getAttributeDataSource(const std::string &value_name)
virtual ~RTT_corba_CConfigurationInterface_i(void)
CORBA::Boolean hasAttribute(const char *name)
RTT_corba_CConfigurationInterface_i(RTT::ConfigurationInterface *ar, PortableServer::POA_ptr the_poa)
base::AttributeBase * getAttribute(const std::string &name) const
A class for keeping track of Attribute, Constant and Property objects of a TaskContext. It allows plugins and remote components to browse the attributes and properties of a TaskContext.
virtual char * propertyToString(const char *name)
virtual CORBA::Boolean propertyFromString(const char *name, const char *value)
virtual CORBA::Boolean attributeFromString(const char *name, const char *value)
vector< string > listProperties(const PropertyBag &source, const std::string &separator)
TypeTransporter * getProtocol(int protocol_id) const
virtual char * getAttributeTypeName(const char *name)
#define ORO_CORBA_PROTOCOL_ID
virtual ::CORBA::Boolean setProperty(const char *name, const ::CORBA::Any &value)
AttributeNames getAttributeNames() const
CORBA::Boolean isAttributeAssignable(const char *name)
vector< string > listPropertyDescriptions(const PropertyBag &source, const std::string &separator)
virtual bool updateFromAny(const CORBA::Any *blob, base::DataSourceBase::shared_ptr target) const =0
boost::intrusive_ptr< DataSourceBase > shared_ptr
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
PortableServer::POA_var mpoa
virtual char * getPropertyType(const char *name)
static Logger::LogFunction endlog()
::RTT::base::DataSourceBase::shared_ptr getPropertyDataSource(const std::string &value_name)
virtual char * getAttributeType(const char *name)