20#ifndef NVUTIL_NVUTIL_H
21#define NVUTIL_NVUTIL_H
23#include <coil/Properties.h>
24#include <rtm/idl/SDOPackageSkel.h>
79 template <
class Value>
80 SDOPackage::NameValue
newNV(
const char* name, Value value)
82 SDOPackage::NameValue nv;
83 nv.name = CORBA::string_dup(name);
149 SDOPackage::NameValue
newNVChar(
const char* name, CORBA::Char value);
177 CORBA::Boolean value);
204 SDOPackage::NameValue
newNVOctet(
const char* name, CORBA::Octet value);
231 SDOPackage::NameValue
newNVAny(
const char* name,
const CORBA::Any& value);
337 const CORBA::Any&
find(
const SDOPackage::NVList& nv,
const char* name);
366 CORBA::Long
find_index(
const SDOPackage::NVList& nv,
const char* name);
395 bool isString(
const SDOPackage::NVList& nv,
const char* name);
460 std::string
toString(
const SDOPackage::NVList& nv,
const char* name);
535 void append(SDOPackage::NVList& dest,
const SDOPackage::NVList& src);
561 const SDOPackage::NameValue& nv);
562 std::ostream&
operator<<(std::ostream& os,
const SDOPackage::NameValue& nv);
587 std::ostream&
operator<<(std::ostream& os,
const SDOPackage::NVList& nvlist);
612 std::ostream&
dump(std::ostream& out,
const SDOPackage::NVList& nv);
628 void dump(
const SDOPackage::NVList& nv);
643 std::string
toString(
const SDOPackage::NVList& nv);
std::ostream & dump_to_stream(std::ostream &out, const SDOPackage::NameValue &nv)
Print information configured in NameValue as string type.
void copyToProperties(coil::Properties &prop, const SDOPackage::NVList &nv)
Copy NVList to the Proeprties.
coil::Properties toProperties(const SDOPackage::NVList &nv)
Transform NVList to the properties.
std::ostream & dump(std::ostream &out, const SDOPackage::NVList &nv)
Print information configured in NVList as string type.
SDOPackage::NameValue newNVOctet(const char *name, CORBA::Octet value)
Create NameValue typed CORBA::Octet.
CORBA::Long find_index(const SDOPackage::NVList &nv, const char *name)
Return the index of element specified by name from NVList.
bool isString(const SDOPackage::NVList &nv, const char *name)
Validate whether value type specified by name is string type.
SDOPackage::NameValue newNVAny(const char *name, const CORBA::Any &value)
Create NameValue typed CORBA::Any.
std::ostream & operator<<(std::ostream &os, const SDOPackage::NameValue &nv)
std::string toString(const SDOPackage::NVList &nv, const char *name)
Get NVList of specifid name as string.
void append(SDOPackage::NVList &dest, const SDOPackage::NVList &src)
Append an element to NVList.
void copyFromProperties(SDOPackage::NVList &nv, const coil::Properties &prop)
Copy the properties to NVList.
bool appendStringValue(SDOPackage::NVList &nv, const char *name, const char *value)
Append the specified string to element of NVList.
SDOPackage::NameValue newNV(const char *name, Value value)
Create NameValue.
Definition NVUtil.h:80
SDOPackage::NameValue newNVBool(const char *name, CORBA::Boolean value)
Create NameValue typed CORBA::Boolean.
bool isStringValue(const SDOPackage::NVList &nv, const char *name, const char *value)
Check whether the value of specified name matches the specified string.
const CORBA::Any & find(const SDOPackage::NVList &nv, const char *name)
Return the value specified by name from NVList.
SDOPackage::NameValue newNVChar(const char *name, CORBA::Char value)
Create NameValue typed CORBA::Char.