#include <Name_Value_Pair.h>
Public Member Functions | |
NVP () | |
Construct an undefined name/value (to allow use in collections). | |
NVP (const TAO_Notify_Property_Short &p) | |
Construct from a property containing a short value. | |
NVP (const TAO_Notify_Property_Long &p) | |
Construct from a property containing a long value. | |
NVP (const TAO_Notify_Property_Time &p) | |
Construct from a property containing a time value. | |
NVP (const TAO_Notify_Property_Boolean &p) | |
Construct from a property containing a boolean value. | |
NVP (const char *n, CORBA::Long v) | |
Construct from name and long value. | |
NVP (const char *n, const char *v) | |
Construct from name and string value. | |
NVP (const char *n, const ACE_CString &v) | |
Construct from name and string value. | |
bool | operator== (const NVP &rhs) const |
Assignment operator. | |
bool | operator!= (const NVP &rhs) const |
Comparison operator compares only name (not value). | |
Public Attributes | |
ACE_CString | name |
ACE_CString | value |
Associates a name (character string) with a value (encoded into a character string) For use in managing properties.
Definition at line 38 of file Name_Value_Pair.h.
|
Construct an undefined name/value (to allow use in collections).
Definition at line 36 of file Name_Value_Pair.cpp.
00037 { 00038 } |
|
Construct from a property containing a short value.
Definition at line 40 of file Name_Value_Pair.cpp. References ACE_OS::sprintf(), TAO_Notify_Property_Short, and TAO_Notify_PropertyBase_T< TYPE >::value().
00041 : name(p.name()) 00042 { 00043 char buf[64]; 00044 ACE_OS::sprintf (buf, "%d", p.value ()); 00045 value = buf; 00046 } |
|
Construct from a property containing a long value.
Definition at line 48 of file Name_Value_Pair.cpp. References ACE_OS::sprintf(), TAO_Notify_Property_Long, and TAO_Notify_PropertyBase_T< TYPE >::value().
00049 : name(p.name()) 00050 { 00051 char buf[64]; 00052 long temp = static_cast<long> (p.value ()); 00053 ACE_OS::sprintf (buf, "%ld", temp); 00054 value = buf; 00055 } |
|
Construct from a property containing a time value.
Definition at line 57 of file Name_Value_Pair.cpp. References ACE_TCHAR, ACE_TEXT_ALWAYS_CHAR, ACE_UINT64, ACE_UINT64_FORMAT_SPECIFIER, ACE_OS::sprintf(), TAO_Notify_Property_Time, and TAO_Notify_PropertyBase_T< TYPE >::value().
00058 : name(p.name()) 00059 { 00060 ACE_TCHAR buf[128]; 00061 ACE_UINT64 us = p.value(); 00062 #ifdef ACE_LACKS_LONGLONG_T 00063 us.as_string(buf); 00064 #else 00065 ACE_OS::sprintf(buf, ACE_UINT64_FORMAT_SPECIFIER, us); 00066 #endif /* ACE_LACKS_LONGLONG_T */ 00067 value = ACE_TEXT_ALWAYS_CHAR (buf); 00068 } |
|
Construct from a property containing a boolean value.
Definition at line 70 of file Name_Value_Pair.cpp. References TAO_Notify_Property_Boolean::value().
|
|
Construct from name and long value.
Definition at line 76 of file Name_Value_Pair.cpp. References ACE_OS::sprintf(), and v.
00077 : name(n) 00078 { 00079 char buf[64]; 00080 long temp = v; 00081 ACE_OS::sprintf (buf, "%ld", temp); 00082 value = buf; 00083 } |
|
Construct from name and string value.
Definition at line 85 of file Name_Value_Pair.cpp. References v.
|
|
Construct from name and string value.
Definition at line 90 of file Name_Value_Pair.cpp. References v.
|
|
Comparison operator compares only name (not value).
Definition at line 100 of file Name_Value_Pair.cpp.
00101 { 00102 return ! (rhs == *this); 00103 } |
|
Assignment operator.
Definition at line 95 of file Name_Value_Pair.cpp. References name.
00096 { 00097 return (this->name == rhs.name) != 0; 00098 } |
|
Definition at line 62 of file Name_Value_Pair.h. Referenced by operator==(). |
|
Definition at line 63 of file Name_Value_Pair.h. |