メインページ | ネームスペース一覧 | クラス階層 | 構成 | Directories | ファイル一覧 | ネームスペースメンバ | 構成メンバ | ファイルメンバ

NVUtil.h

説明を見る。
00001 // -*- C++ -*-
00020 /*
00021  * $Log: NVUtil.h,v $
00022  * Revision 1.5  2007/01/12 14:33:57  n-ando
00023  * The dump() function was added to dump NVList entries.
00024  *
00025  * Revision 1.4  2007/01/06 17:55:35  n-ando
00026  * toProperties()'s argument was changed to const.
00027  * Some functions were added.
00028  * - isStringValue()
00029  * - appendStringValue()
00030  * - append()
00031  *
00032  * Revision 1.3  2006/11/27 09:54:48  n-ando
00033  * Conversion function from NVList to Properties: toProperties() was added.
00034  *
00035  * Revision 1.2  2006/11/10 04:46:15  n-ando
00036  * Kanji-code was changed to EUC.
00037  *
00038  * Revision 1.1  2006/11/10 04:32:46  n-ando
00039  * NVUtil is SDOPackage::NVList utility.
00040  *
00041  *
00042  */
00043 
00044 #ifndef NVUtil_h
00045 #define NVUtil_h
00046 
00047 #include <string>
00048 #include <iostream>
00049 #include <rtm/idl/SDOPackageSkel.h>
00050 #include <rtm/Properties.h>
00051 
00052 namespace NVUtil
00053 {
00082   template <class Value>
00083   SDOPackage::NameValue newNV(const char* name, Value value)
00084   {
00085     SDOPackage::NameValue nv;
00086     nv.name = CORBA::string_dup(name);
00087     nv.value <<= value;
00088     return nv;
00089   }
00090 
00091 
00115   /*
00116   template <>
00117   SDOPackage::NameValue newNV(const char* name, const char* value)
00118   {
00119     SDOPackage::NameValue nv;
00120     nv.name = CORBA::string_dup(name);
00121     nv.value <<= value;
00122     return nv;
00123   }
00124    */ 
00125 
00149   SDOPackage::NameValue newNVChar(const char* name, const CORBA::Char value);
00150     
00151 
00175   SDOPackage::NameValue newNVBool(const char* name,
00176                                   const CORBA::Boolean value);
00177 
00178     
00202   SDOPackage::NameValue newNVOctet(const char* name, const CORBA::Octet value);
00203 
00204   SDOPackage::NameValue newNVAny(const char* name, const CORBA::Any& value);
00205 
00206 
00207 
00231   void copy(SDOPackage::NVList& nv, const RTC::Properties& prop);
00232 
00233 
00234   RTC::Properties toProperties(const SDOPackage::NVList& nv);
00235 
00258   const CORBA::Any& find(const SDOPackage::NVList& nv, const char* name);
00259   const CORBA::Long find_index(const SDOPackage::NVList& nv, const char* name);
00260 
00284   bool isString(const SDOPackage::NVList& nv, const char* name);
00285   bool isStringValue(const SDOPackage::NVList& nv, const char* name,
00286                      const char* value);
00287 
00315   std::string toString(const SDOPackage::NVList& nv, const char* name);
00316 
00317 
00318 
00319   bool appendStringValue(SDOPackage::NVList& nv, const char* name,
00320                          const char* value);
00321 
00322   void append(SDOPackage::NVList& dest, const SDOPackage::NVList& src);
00323 
00324   void dump(SDOPackage::NVList& nv);
00325 };
00326 
00327 #endif // NVUtil_h

OpenRTMに対してMon Jan 15 12:14:44 2007に生成されました。  doxygen 1.4.1