Public Member Functions | Protected Attributes

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)
 Constructor.
 TAO_Notify_StructProperty_T (const char *name)
 Constructor.
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.

Detailed Description

template<class TYPE>
class TAO_Notify_StructProperty_T< TYPE >

Definition at line 122 of file Property_T.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 108 of file Property_T.cpp.

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

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

Constructor.

Definition at line 102 of file Property_T.cpp.

  :name_ (name), valid_(0)
{
}


Member Function Documentation

template<class TYPE >
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.

{
  return this->valid_;
}

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

Return the name.

Definition at line 58 of file Property_T.inl.

{
  return this->name_;
}

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.

{
  CosNotification::PropertyValue value;

  if (property_seq.find (this->name_, value) == 0)
    {
      TYPE* extract_type = 0;

      if ((value >>= extract_type)  && extract_type != 0) // make sure we get something valid.
        {
          this->value_ = *extract_type; // copy
          this->valid_ = 1;
          return 0;
        }
    }

  this->valid_ = 0;
  return -1;
}

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

Return the value.

Definition at line 64 of file Property_T.inl.

{
  return this->value_;
}


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:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines