(file) Return to CIMScope.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

  1 a.dunfey 1.22.18.1 //%2006////////////////////////////////////////////////////////////////////////
  2 mike     1.8       //
  3 karl     1.21      // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4                    // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5                    // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 karl     1.17      // IBM Corp.; EMC Corporation, The Open Group.
  7 karl     1.21      // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8                    // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl     1.22      // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10                    // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 a.dunfey 1.22.18.1 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12                    // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike     1.8       //
 14                    // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 kumpf    1.11      // of this software and associated documentation files (the "Software"), to
 16                    // deal in the Software without restriction, including without limitation the
 17                    // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18 mike     1.8       // sell copies of the Software, and to permit persons to whom the Software is
 19                    // furnished to do so, subject to the following conditions:
 20                    // 
 21 kumpf    1.11      // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike     1.8       // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23                    // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24 kumpf    1.11      // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25                    // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26                    // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27 mike     1.8       // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28                    // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29                    //
 30                    //==============================================================================
 31                    //
 32                    //%/////////////////////////////////////////////////////////////////////////////
 33                    
 34                    #ifndef Pegasus_Scope_h
 35                    #define Pegasus_Scope_h
 36                    
 37                    #include <Pegasus/Common/Config.h>
 38                    #include <Pegasus/Common/String.h>
 39 kumpf    1.12      #include <Pegasus/Common/Linkage.h>
 40 mike     1.8       
 41                    PEGASUS_NAMESPACE_BEGIN
 42                    
 43                    /**
 44 a.dunfey 1.22.18.2     The CIMScope class represents the DMTF standard CIM qualifier scope
 45                        definition.  The scope of a qualifier defines the types of CIM objects
 46                        with which the qualifier may be used.  A CIMScope contains zero or more
 47                        of these values:  CLASS, ASSOCIATION, INDICATION, PROPERTY, REFERENCE,
 48                        METHOD, PARAMETER.
 49 mike     1.8       */
 50 kumpf    1.13      class PEGASUS_COMMON_LINKAGE CIMScope
 51 mike     1.8       {
 52 kumpf    1.13      public:
 53                    
 54 a.dunfey 1.22.18.2     /**
 55                            Constructs a CIMScope object with the value NONE.
 56 kumpf    1.15          */
 57 a.dunfey 1.22.18.2     CIMScope();
 58 kumpf    1.13      
 59 a.dunfey 1.22.18.2     /**
 60                            Constructs a CIMScope object from the value of a specified
 61                            CIMScope object.
 62                            @param scope The CIMScope object from which to construct a new
 63                                CIMScope object.
 64                        */
 65                        CIMScope(const CIMScope& scope);
 66                    
 67                        /**
 68                            Assigns the value of the specified CIMScope object to this object.
 69                            @param scope The CIMScope object from which to assign this
 70                                CIMScope object.
 71                            @return A reference to this CIMScope object.
 72                        */
 73                        CIMScope& operator=(const CIMScope& scope);
 74                    
 75                        /**
 76                            Checks whether the scope contains specified scope values.
 77                            @param scope A CIMScope specifying the scope values to check.
 78                            @return True if the scope contains all the values in the specified
 79                                CIMScope object, false otherwise.
 80 a.dunfey 1.22.18.2     */
 81                        Boolean hasScope(const CIMScope& scope) const;
 82                    
 83                        /**
 84                            Adds scopes value to the CIMScope object.
 85                            <p><b>Example:</b>
 86 karl     1.18              <pre>
 87 a.dunfey 1.22.18.2             CIMScope s;
 88                                s.addScope(CIMScope::INDICATION);
 89                                assert(s.hasScope(CIMScope::INDICATION));
 90 karl     1.18              </pre>
 91 a.dunfey 1.22.18.2         @param scope A CIMScope containing the scope values to add.
 92 kumpf    1.15          */
 93 a.dunfey 1.22.18.2     void addScope(const CIMScope & scope);
 94 kumpf    1.13      
 95 a.dunfey 1.22.18.2     /**
 96                            Compares the CIMScope with a specified CIMScope.
 97                            @param scope The CIMScope to be compared.
 98                            @return True if this scope has the same set of values as the
 99                                specified scope, false otherwise.
100 kumpf    1.15          */
101 kumpf    1.13          Boolean equal (const CIMScope & scope) const;
102                    
103 a.dunfey 1.22.18.2     /**
104                            Adds two scope values.
105                            <p><b>Example:</b>
106 karl     1.18              <pre>
107                                CIMScope s0(CIMScope::CLASS);
108                                CIMScope s1(CIMScope::PARAMETER);
109                                CIMScope s3 = s0 + S1;
110                            </pre>
111 a.dunfey 1.22.18.2         @param scope A CIMScope containing the scope value to add to this
112                                scope.
113                            @return A new CIMScope object containing a union of the values in the
114                                two scope objects.
115 kumpf    1.15          */
116 a.dunfey 1.22.18.2     CIMScope operator+(const CIMScope & scope) const;
117 kumpf    1.14      
118 a.dunfey 1.22.18.2     /**
119                            Returns a String representation of the CIMScope object.
120 kumpf    1.15              This method is for diagnostic purposes. The format of the output
121 kumpf    1.13              is subject to change.
122 a.dunfey 1.22.18.2         @return A String containing a human-readable representation of the
123                                scope value.
124 kumpf    1.15          */
125 a.dunfey 1.22.18.2     String toString() const;
126 kumpf    1.13      
127 a.dunfey 1.22.18.2     /**
128                            Indicates that the CIMScope object has no value (is uninitialized).
129                            This is not a valid qualifier scope.
130 kumpf    1.15          */
131 kumpf    1.14          static const CIMScope NONE;
132 kumpf    1.13      
133 a.dunfey 1.22.18.2     /**
134                            Indicates that the qualifier may be used with classes.
135 kumpf    1.15          */
136 kumpf    1.14          static const CIMScope CLASS;
137 kumpf    1.13      
138 a.dunfey 1.22.18.2     /**
139                            Indicates that the qualifier may be used with associations.
140 kumpf    1.15          */
141 kumpf    1.14          static const CIMScope ASSOCIATION;
142 kumpf    1.13      
143 a.dunfey 1.22.18.2     /**
144                            Indicates that the qualifier may be used with indications.
145 kumpf    1.15          */
146 kumpf    1.14          static const CIMScope INDICATION;
147 kumpf    1.13      
148 a.dunfey 1.22.18.2     /**
149                            Indicates that the qualifier may be used with properties.
150 kumpf    1.15          */
151 kumpf    1.14          static const CIMScope PROPERTY;
152 kumpf    1.13      
153 a.dunfey 1.22.18.2     /**
154                            Indicates that the qualifier may be used with references.
155 kumpf    1.15          */
156 kumpf    1.14          static const CIMScope REFERENCE;
157 kumpf    1.13      
158 a.dunfey 1.22.18.2     /**
159                            Indicates that the qualifier may be used with methods.
160 kumpf    1.15          */
161 kumpf    1.14          static const CIMScope METHOD;
162 kumpf    1.13      
163 a.dunfey 1.22.18.2     /**
164                            Indicates that the qualifier may be used with parameters.
165 kumpf    1.15          */
166 kumpf    1.14          static const CIMScope PARAMETER;
167 kumpf    1.13      
168 a.dunfey 1.22.18.2     /**
169                            Indicates that the qualifier may be used with any of the types
170 kumpf    1.13              of objects (classes, associations, indications, properties, references,
171 kumpf    1.15              methods, parameters).
172                        */
173 kumpf    1.14          static const CIMScope ANY;
174 kumpf    1.13      
175                    private:
176 kumpf    1.14      
177                        CIMScope (const Uint32 scope);
178 kumpf    1.13          Uint32 cimScope;
179 a.dunfey 1.22.18.2 
180 schuur   1.19          friend class BinaryStreamer;
181 mike     1.8       };
182                    
183                    PEGASUS_NAMESPACE_END
184                    
185                    #endif /* Pegasus_Scope_h */

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2