NVUtil.h

説明を見る。
00001 // -*- C++ -*-
00020 #ifndef NVUtil_h
00021 #define NVUtil_h
00022 
00023 #include <string>
00024 #include <iostream>
00025 #include <rtm/idl/SDOPackageSkel.h>
00026 #include <coil/Properties.h>
00027 
00042 namespace NVUtil
00043 {
00074   template <class Value>
00075   SDOPackage::NameValue newNV(const char* name, Value value)
00076   {
00077     SDOPackage::NameValue nv;
00078     nv.name = CORBA::string_dup(name);
00079     nv.value <<= value;
00080     return nv;
00081   }
00082   
00083   /***
00084    * @if jp
00085    *
00086    * @brief value が CORBA::string の NameValue を生成する
00087    *
00088    * このオペレーションはf value が CORBA::string の NameValueを作成する。
00089    *
00090    * @param name NameValue の name
00091    * @param value NameValue の value
00092    *
00093    * @return NameValue
00094    *
00095    * @else
00096    *
00097    * @brief Create NameValue typed CORBA::string
00098    *
00099    * This operation creates NameValue typed CORBA::string.
00100    *
00101    * @param name Name of NameValue
00102    * @param value The value of NameValue
00103    *
00104    * @return NameValue
00105    *
00106    * @endif
00107    */
00108   /*
00109     template <>
00110     SDOPackage::NameValue newNV(const char* name, const char* value)
00111     {
00112     SDOPackage::NameValue nv;
00113     nv.name = CORBA::string_dup(name);
00114     nv.value <<= value;
00115     return nv;
00116     }
00117   */ 
00118   
00144   SDOPackage::NameValue newNVChar(const char* name, const CORBA::Char value);
00145   
00171   SDOPackage::NameValue newNVBool(const char* name,
00172                                   const CORBA::Boolean value);
00173   
00199   SDOPackage::NameValue newNVOctet(const char* name, const CORBA::Octet value);
00200   
00226   SDOPackage::NameValue newNVAny(const char* name, const CORBA::Any& value);
00227   
00251 //  void copyFromProperties(SDOPackage::NVList& nv, const RTC::Properties& prop);
00252   void copyFromProperties(SDOPackage::NVList& nv, const coil::Properties& prop);
00253   
00275 //  void copyToProperties(RTC::Properties& prop, const SDOPackage::NVList& nv);
00276   void copyToProperties(coil::Properties& prop, const SDOPackage::NVList& nv);
00277   
00301 //  RTC::Properties toProperties(const SDOPackage::NVList& nv);
00302   coil::Properties toProperties(const SDOPackage::NVList& nv);
00303   
00331   const CORBA::Any& find(const SDOPackage::NVList& nv, const char* name);
00332   
00360   const CORBA::Long find_index(const SDOPackage::NVList& nv, const char* name);
00361   
00389   bool isString(const SDOPackage::NVList& nv, const char* name);
00390   
00422   bool isStringValue(const SDOPackage::NVList& nv, const char* name,
00423                      const char* value);
00424   
00454   std::string toString(const SDOPackage::NVList& nv, const char* name);
00455   
00498   bool appendStringValue(SDOPackage::NVList& nv, const char* name,
00499                          const char* value);
00500   
00524   void append(SDOPackage::NVList& dest, const SDOPackage::NVList& src);
00525   
00549   std::ostream& dump(std::ostream& out, const SDOPackage::NVList& nv);
00550 
00551   void dump(const SDOPackage::NVList& nv);
00552 
00553   std::string toString(const SDOPackage::NVList& nv);
00554   
00555 
00556 };
00557 #endif // NVUtil_h

OpenRTMに対してSun May 24 14:08:25 2009に生成されました。  doxygen 1.5.3