TAO_Notify_StructProperty_T< TYPE > Class Template Reference

#include <Property_T.h>

Collaboration diagram for TAO_Notify_StructProperty_T< TYPE >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Notify_StructProperty_T (const char *name, const TYPE &initial)
 Constuctor.

 TAO_Notify_StructProperty_T (const char *name)
 Constuctor.

int set (const TAO_Notify_PropertySeq &property_seq)
const char * name (void) const
 Return the name.

const TYPE & value (void) const
 Return the value.

CORBA::Boolean is_valid (void) const
 Is the current value valid.


Protected Attributes

const char * name_
 The Property name.

TYPE value_
 The value.

CORBA::Boolean valid_
 Is the value valid.

template<class TYPE>
class TAO_Notify_StructProperty_T< TYPE >


Constructor & Destructor Documentation

template<class TYPE>
TAO_Notify_StructProperty_T< TYPE >::TAO_Notify_StructProperty_T const char *  name,
const TYPE &  initial
 

Constuctor.

Definition at line 108 of file Property_T.cpp.

00109   :name_ (name), value_ (initial), valid_ (1)
00110 {
00111 }

template<class TYPE>
TAO_Notify_StructProperty_T< TYPE >::TAO_Notify_StructProperty_T const char *  name  ) 
 

Constuctor.

Definition at line 102 of file Property_T.cpp.

00103   :name_ (name), valid_(0)
00104 {
00105 }


Member Function Documentation

template<class TYPE>
ACE_INLINE CORBA::Boolean TAO_Notify_StructProperty_T< TYPE >::is_valid void   )  const
 

Is the current value valid.

Definition at line 72 of file Property_T.inl.

Referenced by TAO_Notify_QoSProperties::init(), and TAO_Notify_Object::set_qos().

00073 {
00074   return this->valid_;
00075 }

template<class TYPE>
ACE_INLINE const char * TAO_Notify_StructProperty_T< TYPE >::name void   )  const
 

Return the name.

Definition at line 58 of file Property_T.inl.

00059 {
00060   return this->name_;
00061 }

template<class TYPE>
int TAO_Notify_StructProperty_T< TYPE >::set const TAO_Notify_PropertySeq property_seq  ) 
 

Init this Property from the sequence. Returns 0 on success, -1 on error

Definition at line 114 of file Property_T.cpp.

References TAO_Notify_PropertySeq::find(), and CosNotification::PropertyValue.

Referenced by TAO_Notify_QoSProperties::init().

00116 {
00117   CosNotification::PropertyValue value;
00118 
00119   if (property_seq.find (this->name_, value) == 0)
00120     {
00121       TYPE* extract_type = 0;
00122 
00123       if ((value >>= extract_type)  && extract_type != 0) // make sure we get something valid.
00124         {
00125           this->value_ = *extract_type; // copy
00126           this->valid_ = 1;
00127           return 0;
00128         }
00129     }
00130 
00131   this->valid_ = 0;
00132   return -1;
00133 }

template<class TYPE>
ACE_INLINE const TYPE & TAO_Notify_StructProperty_T< TYPE >::value void   )  const
 

Return the value.

Definition at line 64 of file Property_T.inl.

Referenced by TAO_Notify_QoSProperties::init(), and TAO_Notify_Object::set_qos().

00065 {
00066   return this->value_;
00067 }


Member Data Documentation

template<class TYPE>
const char* TAO_Notify_StructProperty_T< TYPE >::name_ [protected]
 

The Property name.

Definition at line 146 of file Property_T.h.

template<class TYPE>
CORBA::Boolean TAO_Notify_StructProperty_T< TYPE >::valid_ [protected]
 

Is the value valid.

Definition at line 152 of file Property_T.h.

template<class TYPE>
TYPE TAO_Notify_StructProperty_T< TYPE >::value_ [protected]
 

The value.

Definition at line 149 of file Property_T.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:33:18 2006 for TAO_CosNotification by doxygen 1.3.6