20 #include <coil/UUID.h> 36 : rtclog(
"organization")
38 m_varOwner = sdo.in();
43 m_pId =
uuid->to_string();
48 m_objref = this->_this();
50 #endif // ORB_IS_RTORB 53 : rtclog(
"organization"), m_varOwner(SDOSystemElement::_duplicate(sdo))
58 m_pId =
uuid->to_string();
84 throw (CORBA::SystemException,
85 InvalidParameter, NotAvailable, InternalError)
87 RTC_TRACE((
"get_organization_id() = %s", m_pId.c_str()));
88 return CORBA::string_dup(m_pId.c_str());
99 throw (CORBA::SystemException,
100 NotAvailable, InternalError)
102 RTC_TRACE((
"get_organization_property()"));
104 OrganizationProperty_var
prop;
118 throw (CORBA::SystemException,
119 InvalidParameter, NotAvailable, InternalError)
121 RTC_TRACE((
"get_organization_property_value(%s)", name));
122 if (std::string(name).empty())
123 throw InvalidParameter(
"Empty name.");
129 throw InvalidParameter(
"Not found.");
133 CORBA::Any_var value;
134 value =
new CORBA::Any(
m_orgProperty.properties[index].value);
135 return value._retn();
139 throw InternalError(
"get_organization_property_value()");
142 return new CORBA::Any();
155 throw (CORBA::SystemException,
156 InvalidParameter, NotAvailable, InternalError)
158 RTC_TRACE((
"add_organization_property()"));
167 throw InternalError(
"set_organization_property()");
181 const CORBA::Any& value)
182 throw (CORBA::SystemException,
183 InvalidParameter, NotAvailable, InternalError)
185 RTC_TRACE((
"set_organization_property_value(name=%s)", name));
186 if (std::string(name).empty())
188 throw InvalidParameter(
"set_organization_property_value(): Enpty name.");
196 nv.name = CORBA::string_dup(name);
216 throw (CORBA::SystemException,
217 InvalidParameter, NotAvailable, InternalError)
219 RTC_TRACE((
"remove_organization_property(%s)", name));
220 if (std::string(name).empty())
221 throw InvalidParameter(
"remove_organization_property(): Enpty name.");
226 throw InvalidParameter(
"remove_organization_property(): Not found.");
235 throw InternalError(
"remove_organization_property()");
248 throw (CORBA::SystemException,
249 NotAvailable, InternalError)
263 throw (CORBA::SystemException,
264 InvalidParameter, NotAvailable, InternalError)
267 if (CORBA::is_nil(sdo))
268 throw InvalidParameter(
"set_owner()");
271 m_varOwner = SDOSystemElement::_duplicate(sdo);
276 throw InternalError(
"set_owner()");
289 throw (CORBA::SystemException,
290 NotAvailable, InternalError)
301 throw InternalError(
"get_members()");
313 throw (CORBA::SystemException,
314 InvalidParameter, NotAvailable, InternalError)
317 if (sdos.length() < 0)
318 throw InvalidParameter(
"set_members(): number of SDOList is invalid.");
326 throw InternalError(
"set_members()");
339 throw (CORBA::SystemException,
340 InvalidParameter, NotAvailable, InternalError)
343 if (sdo_list.length() < 0)
344 throw InvalidParameter(
"set_members(): number of SDOList is invalid.");
347 if (sdo_list.length() == 0)
return true;
353 throw InternalError(
"add_members()");
366 throw (CORBA::SystemException,
367 InvalidParameter, NotAvailable, InternalError)
371 if (std::string(
id).empty())
373 RTC_ERROR((
"remove_member(): Enpty name."));
374 throw InvalidParameter(
"remove_member(): Enpty name.");
382 RTC_ERROR((
"remove_member(): Not found."));
383 throw InvalidParameter(
"remove_member(): Not found.");
394 throw InternalError(
"remove_member(): Not found.");
407 throw (CORBA::SystemException,
408 NotAvailable, InternalError)
422 throw (CORBA::SystemException,
423 NotAvailable, InternalError)
433 throw InternalError(
"set_dependency(): Unknown.");
#define RTC_ERROR(fmt)
Error log output macro.
void erase(CorbaSequence &seq, CORBA::ULong index)
Erase the element of the specified index.
virtual CORBA::Boolean add_organization_property(const OrganizationProperty &org_property)
[CORBA interface] Set OrganizationProperty
virtual SDOList * get_members()
[CORBA interface] Get the member list of the Organization
virtual SDOSystemElement_ptr get_owner()
[CORBA interface] Get the owner of Organization
void init()
Initialization.
virtual char * get_organization_id()
[CORBA interface] Get Organization ID
SDO Organization implementation class.
virtual CORBA::Boolean remove_organization_property(const char *name)
[CORBA interface] Remove specified OrganizationProperty
virtual CORBA::Boolean set_organization_property_value(const char *name, const CORBA::Any &value)
[CORBA interface] Set specified value of OrganizationProperty
virtual DependencyType get_dependency()
[CORBA interface] Get the DependencyType of the Organization
coil::UUID * generateUUID(ACE_UINT16 version=0x0001, u_char variant=0x80)
virtual CORBA::Boolean set_members(const SDOList &sdos)
[CORBA interface] Set SDO
CORBA::Long find(const CorbaSequence &seq, Functor f)
Return the index of CORBA sequence element that functor matches.
SDOPackage::OrganizationProperty m_orgProperty
Organization property.
Organization_var m_objref
CORBA sequence utility template functions.
virtual CORBA::Boolean remove_member(const char *id)
[CORBA interface] Remove member SDO from Organization
SDOPackage::SDOList m_memberList
A list of SDO members associated with the Organization.
prop
Organization::get_organization_property ();.
virtual CORBA::Boolean set_owner(SDOSystemElement_ptr sdo)
[CORBA interface] Set the owner to the Organization
Organization_impl(SDOSystemElement_ptr sdo)
Constructor.
virtual ~Organization_impl(void)
Virtual destructor.
SDOPackage::SDOSystemElement_var m_varOwner
The owner of the Organization.
virtual OrganizationProperty * get_organization_property()
[CORBA interface] Get OrganizationProperty
void push_back_list(CorbaSequence &seq1, const CorbaSequence &seq2)
Merge the elements of the CORBA sequence.
void push_back(CorbaSequence &seq, SequenceElement elem)
Push the new element back to the CORBA sequence.
SDOPackage::DependencyType m_dependency
Dependency type.
virtual CORBA::Any * get_organization_property_value(const char *name)
[CORBA interface] Get specified value of OrganizationProperty
virtual CORBA::Boolean add_members(const SDOList &sdo_list)
[CORBA interface] Add the member SDOs
virtual CORBA::Boolean set_dependency(DependencyType dependency)
[CORBA interface] Set the DependencyType of the Organization