diff options
Diffstat (limited to 'ace/Capabilities.h')
-rw-r--r-- | ace/Capabilities.h | 141 |
1 files changed, 74 insertions, 67 deletions
diff --git a/ace/Capabilities.h b/ace/Capabilities.h index 83510eb9810..03fc25242e6 100644 --- a/ace/Capabilities.h +++ b/ace/Capabilities.h @@ -1,18 +1,15 @@ /* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// ace -// -// = FILENAME -// Capabilities.h -// -// = AUTHOR -// Arturo Montes <mitosys@colomsat.net.co> -// -// ============================================================================ + +//============================================================================= +/** + * @file Capabilities.h + * + * $Id$ + * + * @author Arturo Montes <mitosys@colomsat.net.co> + */ +//============================================================================= + #ifndef ACE_CAPABILITIES_H #define ACE_CAPABILITIES_H @@ -28,16 +25,18 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ +/** + * @class ACE_CapEntry + * + * @brief This class is the base class for all ACE Capabilities entry + * subclasses. + * + * This class is not instantiable and does not provide accessors + * or methods. If you want to add a new kind of attribute you + * subclasses of this class and dynamic cast to proper subclass. + */ class ACE_Export ACE_CapEntry { - // = TITLE - // This class is the base class for all ACE Capabilities entry - // subclasses. - // - // = DESCRIPTION - // This class is not instantiable and does not provide accessors - // or methods. If you want to add a new kind of attribute you - // subclasses of this class and dynamic cast to proper subclass. public: virtual ~ACE_CapEntry (void); @@ -54,14 +53,16 @@ protected: int captype_; }; +/** + * @class ACE_IntCapEntry + * + * @brief This class implement the ACE Integer Capability subclass. + * + * This is a container class for ACE Capabilities integer container + * values. + */ class ACE_Export ACE_IntCapEntry : public ACE_CapEntry { - // = TITLE - // This class implement the ACE Integer Capability subclass. - // - // = DESCRIPTION - // This is a container class for ACE Capabilities integer container - // values. public: ACE_IntCapEntry (int val); int getval (void) const; @@ -70,14 +71,16 @@ protected: int val_; }; +/** + * @class ACE_StringCapEntry + * + * @brief This class implement the ACE String Capability subclass. + * + * This is a container class for ACE Capabilities String container + * values. + */ class ACE_Export ACE_StringCapEntry : public ACE_CapEntry { - // = TITLE - // This class implement the ACE String Capability subclass. - // - // = DESCRIPTION - // This is a container class for ACE Capabilities String container - // values. public: ACE_StringCapEntry (const ACE_TString &val); ACE_TString getval (void) const; @@ -86,14 +89,16 @@ protected: ACE_TString val_; }; +/** + * @class ACE_BoolCapEntry + * + * @brief This class implement the ACE Bool Capability subclass. + * + * This is a container class for ACE Capabilities bool container + * values. + */ class ACE_Export ACE_BoolCapEntry : public ACE_CapEntry { - // = TITLE - // This class implement the ACE Bool Capability subclass. - // - // = DESCRIPTION - // This is a container class for ACE Capabilities bool container - // values. public: ACE_BoolCapEntry (int val); int getval (void) const; @@ -102,66 +107,68 @@ protected: int val_; }; +/** + * @class ACE_Capabilities + * + * @brief This class implement the ACE Capabilities. + * + * This is a container class for ACE Capabilities + * values. Currently exist three different capability values: + * <ACE_IntCapEntry> (integer), <ACE_BoolCapEntry> (bool) and + * <ACE_StringCapEntry> (String). An <ACE_Capabilities> is a + * unordered set of pair = (<String>, <ACE_CapEntry> *). Where + * the first component is the name of capability and the second + * component is a pointer to the capability value container. A + * <FILE> is a container for <ACE_Capabilities>, the + * <ACE_Capabilities> has a name in the file, as a termcap file. + */ class ACE_Export ACE_Capabilities { - // = TITLE - // This class implement the ACE Capabilities. - // - // = DESCRIPTION - // This is a container class for ACE Capabilities - // values. Currently exist three different capability values: - // <ACE_IntCapEntry> (integer), <ACE_BoolCapEntry> (bool) and - // <ACE_StringCapEntry> (String). An <ACE_Capabilities> is a - // unordered set of pair = (<String>, <ACE_CapEntry> *). Where - // the first component is the name of capability and the second - // component is a pointer to the capability value container. A - // <FILE> is a container for <ACE_Capabilities>, the - // <ACE_Capabilities> has a name in the file, as a termcap file. public: + /// The Constructor ACE_Capabilities (void); - // The Constructor + /// The Destructor ~ACE_Capabilities(void); - // The Destructor public: + /// Get a string entry. int getval (const ACE_TCHAR *ent, ACE_TString &val); - // Get a string entry. + /// Get an integer entry. int getval (const ACE_TCHAR *ent, int &val); - // Get an integer entry. + /// Get the ACE_Capabilities name from FILE fname and load the + /// associated capabitily entries in map. int getent (const ACE_TCHAR *fname, const ACE_TCHAR *name); - // Get the ACE_Capabilities name from FILE fname and load the - // associated capabitily entries in map. protected: // Parse an integer property + /// Parse a string property const ACE_TCHAR *parse (const ACE_TCHAR *buf, int &cap); - // Parse a string property + /// Fill the ACE_Capabilities with description in ent. const ACE_TCHAR *parse (const ACE_TCHAR *buf, ACE_TString &cap); - // Fill the ACE_Capabilities with description in ent. + /// Parse a cap entry int fillent(const ACE_TCHAR *ent); - // Parse a cap entry + /// Get a line from FILE input stream int parseent (const ACE_TCHAR *name, ACE_TCHAR *line); - // Get a line from FILE input stream + /// Is a valid entry int getline (FILE* fp, ACE_TString &line); - // Is a valid entry + /// Reset the set of capabilities int is_entry (const ACE_TCHAR *name, const ACE_TCHAR *line); - // Reset the set of capabilities + /// Atributes. void resetcaps (void); - // Atributes. private: + /// This is the set of ACE_CapEntry. ACE_Hash_Map_Manager<ACE_TString, ACE_CapEntry *, ACE_Null_Mutex> caps_; - // This is the set of ACE_CapEntry. }; #if defined (ACE_IS_SPLITTING) |