dca_interface  6.3.4
base_category.h
Go to the documentation of this file.
1 /* IBM Source Code */
2 /* (C) Copyright IBM Corp. 2009, 2012 */
3 /* Licensed Materials - Property of IBM */
4 /* US Government Users Restricted Rights - Use duplication or disclosure restricted by GSA Schedule Contract with IBM Corp. */
5 
6 #ifndef BASE_CATEGORY_H
7 #define BASE_CATEGORY_H
8 
15 namespace dca {
16 
17  class category_p;
18 
25  class Category
26  {
27  public:
29  Category();
30  Category( const Category& cat );
31  Category& operator = ( const Category& cat );
32  virtual ~Category();
34 
36  bool operator == ( const Category& aCategory ) const;
37 
39  bool operator != ( const Category& aCategory ) const;
40 
43 
46 
53  std::string name( const std::string& localeString = std::string() ) const;
54 
56  PRIVATE_PTR category_p *_p;
57  };
58 
62  extern Category NullCategory;
63 
64 }
65 
66 #endif
int DCA_GROUP_ID_TYPE
Type for group ids.
Definition: base_types.h:36
DCA_CATEGORY_ID_TYPE id() const
The category id.
bool operator==(const Category &aCategory) const
Equality operator, returns true if aCategory.id() == this->id().
Category NullCategory
Defines a constant unassigned Category you can use for checks. if( myCat == NullCategory ) --> myCat ...
int DCA_CATEGORY_ID_TYPE
Type for category ids.
Definition: base_types.h:31
bool operator!=(const Category &aCategory) const
Inequality operator, returns true if aCategory.id() != this->id().
std::string name(const std::string &localeString=std::string()) const
Returns the localized (display) name of the category.
DCA_GROUP_ID_TYPE groupId() const
If the category is associated with a group, this is the group id.
#define PRIVATE_PTR
Type for private pointer implementations, for internal use only.
Definition: base_types.h:83
Encapsulates a category as defined in the categories XML schema (see Categories XML: Categories).
Definition: base_category.h:26