00001 // -*- C++ -*- 00002 00003 /** 00004 * @file Property_Boolean.h 00005 * 00006 * $Id: Property_Boolean.h 81422 2008-04-24 12:33:29Z johnnyw $ 00007 * 00008 * @author Pradeep Gore <pradeep@oomworks.com> 00009 */ 00010 00011 #ifndef TAO_Notify_PROPERTY_BOOLEAN_H 00012 #define TAO_Notify_PROPERTY_BOOLEAN_H 00013 00014 #include /**/ "ace/pre.h" 00015 00016 #include "orbsvcs/Notify/notify_serv_export.h" 00017 00018 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00019 # pragma once 00020 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00021 00022 #include "orbsvcs/CosNotificationC.h" 00023 00024 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00025 00026 class TAO_Notify_PropertySeq; 00027 00028 /** 00029 * @class TAO_Notify_Property_Boolean 00030 * 00031 * @brief Boolean Property. 00032 * 00033 */ 00034 class TAO_Notify_Serv_Export TAO_Notify_Property_Boolean 00035 { 00036 public: 00037 /// Constructor 00038 TAO_Notify_Property_Boolean (const char* name, CORBA::Boolean initial); 00039 00040 /// Constructor 00041 TAO_Notify_Property_Boolean (const char* name); 00042 00043 /// Assignment from TAO_Notify_Property_Boolean 00044 TAO_Notify_Property_Boolean& operator= (const TAO_Notify_Property_Boolean& rhs); 00045 00046 /// Assignment from CORBA::Boolean 00047 TAO_Notify_Property_Boolean& operator= (const CORBA::Boolean& rhs); 00048 00049 /// Equality comparison operator. 00050 bool operator== (const CORBA::Boolean &rhs) const; 00051 00052 /// Inequality comparison operator. 00053 bool operator!= (const CORBA::Boolean &rhs) const; 00054 00055 int set (const TAO_Notify_PropertySeq& property_seq); 00056 00057 void get (CosNotification::PropertySeq& prop_seq); 00058 00059 /// Return the name 00060 const char * name (void) const; 00061 00062 /// Return the value. 00063 CORBA::Boolean value (void) const; 00064 00065 /// Is the current value valid 00066 CORBA::Boolean is_valid (void) const; 00067 00068 protected: 00069 /// The Property name. 00070 const char* name_; 00071 00072 /// The value 00073 CORBA::Boolean value_; 00074 00075 /// Is the value valid 00076 CORBA::Boolean valid_; 00077 }; 00078 00079 TAO_END_VERSIONED_NAMESPACE_DECL 00080 00081 #if defined (__ACE_INLINE__) 00082 #include "orbsvcs/Notify/Property_Boolean.inl" 00083 #endif /* __ACE_INLINE__ */ 00084 00085 #include /**/ "ace/post.h" 00086 00087 #endif /* TAO_Notify_PROPERTY_BOOLEAN_H */