diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/Notify/PropertySeq.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Notify/PropertySeq.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Notify/PropertySeq.h b/TAO/orbsvcs/orbsvcs/Notify/PropertySeq.h new file mode 100644 index 00000000000..4371aea34f9 --- /dev/null +++ b/TAO/orbsvcs/orbsvcs/Notify/PropertySeq.h @@ -0,0 +1,62 @@ +/* -*- C++ -*- */ +/** + * @file PropertySeq.h + * + * $Id$ + * + * @author Pradeep Gore <pradeep@oomworks.com> + * + * + */ + +#ifndef TAO_NS_PROPERTYSEQ_H +#define TAO_NS_PROPERTYSEQ_H +#include "ace/pre.h" + +#include "notify_export.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#include "orbsvcs/CosNotificationC.h" +#include "ace/Hash_Map_Manager.h" +#include "ace/SString.h" + +/** + * @class TAO_NS_PropertySeq + * + * @brief + * + */ +class TAO_Notify_Export TAO_NS_PropertySeq +{ +public: + /// Constuctor + TAO_NS_PropertySeq (void); + + /// Destructor + ~TAO_NS_PropertySeq (); + + /// Return 0 on success, -1 on error. + int init (const CosNotification::PropertySeq& prop_seq); + + /// Find the <value> for property <name>. Returns 0 on success. + int find (const ACE_CString& name, CosNotification::PropertyValue& value) const; + + /// Return -1 on error. + int populate (CosNotification::PropertySeq_var& prop_seq); + +protected: + /// Property Map. + typedef ACE_Hash_Map_Manager <ACE_CString, CosNotification::PropertyValue, ACE_SYNCH_NULL_MUTEX> PROPERTY_MAP; + + PROPERTY_MAP property_map_; +}; + +#if defined (__ACE_INLINE__) +#include "PropertySeq.inl" +#endif /* __ACE_INLINE__ */ + +#include "ace/post.h" +#endif /* TAO_NS_PROPERTYSEQ_H */ |