Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

NVUtil.h File Reference

NameValue and NVList utility functions. More...

#include <string>
#include <iostream>
#include <rtm/idl/SDOPackageSkel.h>
#include <rtm/Properties.h>

Go to the source code of this file.

Namespaces

namespace  NVUtil

Functions

template<class Value>
SDOPackage::NameValue newNV (const char *name, Value value)
 Create NameVale.
SDOPackage::NameValue newNVChar (const char *name, const CORBA::Char value)
 Create CORBA::string value type NameVale Create CORBA::Char value type NameVale.
SDOPackage::NameValue newNVBool (const char *name, const CORBA::Boolean value)
 Create CORBA::Boolean value type NameVale.
SDOPackage::NameValue newNVOctet (const char *name, const CORBA::Octet value)
 Create CORBA::Octet value type NameVale.
SDOPackage::NameValue newNVAny (const char *name, const CORBA::Any &value)
void copyFromProperties (SDOPackage::NVList &nv, const RTC::Properties &prop)
 Copy to NVList from Proeprties.
void copyToProperties (RTC::Properties &prop, const SDOPackage::NVList &nv)
RTC::Properties toProperties (const SDOPackage::NVList &nv)
const CORBA::Any & find (const SDOPackage::NVList &nv, const char *name)
 Get value in NVList specified by name.
const CORBA::Long find_index (const SDOPackage::NVList &nv, const char *name)
bool isString (const SDOPackage::NVList &nv, const char *name)
 Whether the name of NVList's value is CORBA::string.
bool isStringValue (const SDOPackage::NVList &nv, const char *name, const char *value)
std::string toString (const SDOPackage::NVList &nv, const char *name)
 Get string value in NVList specified by name.
bool appendStringValue (SDOPackage::NVList &nv, const char *name, const char *value)
void append (SDOPackage::NVList &dest, const SDOPackage::NVList &src)
void dump (SDOPackage::NVList &nv)


Detailed Description

NameValue and NVList utility functions.

Date:
Date
2007/04/23 04:54:32
Author:
Noriaki Ando <n-ando@aist.go.jp>
Copyright (C) 2006 Noriaki Ando Task-intelligence Research Group, Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved.

Id
NVUtil.h,v 1.6 2007/04/23 04:54:32 n-ando Exp

Function Documentation

void append SDOPackage::NVList &  dest,
const SDOPackage::NVList &  src
 

bool appendStringValue SDOPackage::NVList &  nv,
const char *  name,
const char *  value
 

void copyFromProperties SDOPackage::NVList &  nv,
const RTC::Properties prop
 

Copy to NVList from Proeprties.

This operation copies Properties to NVList. Created NVList's values are CORBA::string.

Parameters:
nv NVList to store Properties values
prop Properties that is copies from

void copyToProperties RTC::Properties prop,
const SDOPackage::NVList &  nv
 

void dump SDOPackage::NVList &  nv  ) 
 

const CORBA::Any& find const SDOPackage::NVList &  nv,
const char *  name
 

Get value in NVList specified by name.

This operation returns Any type of value specified by name. Created NVList's values are CORBA::string.

Parameters:
nv NVList to be searched
prop name to seartch in NVList

const CORBA::Long find_index const SDOPackage::NVList &  nv,
const char *  name
 

bool isString const SDOPackage::NVList &  nv,
const char *  name
 

Whether the name of NVList's value is CORBA::string.

This operation returns boolean value whether the name of NVList's value is CORBA::string.

Parameters:
nv NVList to be searched
prop name to seartch in NVList

bool isStringValue const SDOPackage::NVList &  nv,
const char *  name,
const char *  value
 

template<class Value>
SDOPackage::NameValue newNV const char *  name,
Value  value
 

Create NameVale.

This operation creates NameVale. CORBA::Char, CORBA::Boolean, CORBA::Octet creation is not supported. These type of NameValue should be created by using newNVChar(), newNVBool(), newNVOctet() functions.

Parameters:
name name of NameValue
value value of NameValue
Returns:
NameValue

SDOPackage::NameValue newNVAny const char *  name,
const CORBA::Any &  value
 

SDOPackage::NameValue newNVBool const char *  name,
const CORBA::Boolean  value
 

Create CORBA::Boolean value type NameVale.

This operation creates CORBA::Boolean value type NameVale.

Parameters:
name name of NameValue
value value of NameValue
Returns:
NameValue

SDOPackage::NameValue newNVChar const char *  name,
const CORBA::Char  value
 

Create CORBA::string value type NameVale Create CORBA::Char value type NameVale.

This operation creates CORBA::Char value type NameVale.

Parameters:
name name of NameValue
value value of NameValue
Returns:
NameValue

SDOPackage::NameValue newNVOctet const char *  name,
const CORBA::Octet  value
 

Create CORBA::Octet value type NameVale.

This operation creates CORBA::Octet value type NameVale.

Parameters:
name name of NameValue
value value of NameValue
Returns:
NameValue

RTC::Properties toProperties const SDOPackage::NVList &  nv  ) 
 

std::string toString const SDOPackage::NVList &  nv,
const char *  name
 

Get string value in NVList specified by name.

This operation returns string value in NVList specified by name. If the value in NVList specified by name is not CORBA::string type this operation returns empty string value.

Parameters:
nv NVList to be searched
name name to to serach
Returns:
string value named by name


Generated on Fri Oct 5 05:16:00 2007 for OpenRTM by  doxygen 1.4.1