(file) Return to propertyset.h CVS log (file) (dir) Up to [OMI] / omi / micxx

 1 mike  1.1 /*
 2           **==============================================================================
 3           **
 4           ** Open Management Infrastructure (OMI)
 5           **
 6           ** Copyright (c) Microsoft Corporation
 7           ** 
 8           ** Licensed under the Apache License, Version 2.0 (the "License"); you may not 
 9           ** use this file except in compliance with the License. You may obtain a copy 
10           ** of the License at 
11           **
12           **     http://www.apache.org/licenses/LICENSE-2.0 
13           **
14           ** THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15           ** KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED 
16           ** WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, 
17           ** MERCHANTABLITY OR NON-INFRINGEMENT. 
18           **
19           ** See the Apache 2 License for the specific language governing permissions 
20           ** and limitations under the License.
21           **
22 mike  1.1 **==============================================================================
23           */
24           
25           #ifndef _micxx_propertyset_h
26           #define _micxx_propertyset_h
27           
28           #include <MI.h>
29           #include <string.h>
30           #include <stdio.h>
31           #include "linkage.h"
32           #include "string.h"
33           
34           MI_BEGIN_NAMESPACE
35           
36           class MICXX_LINKAGE PropertySet
37           {
38           public:
39           
40               PropertySet(MI_PropertySet* propertySet);
41           
42               ~PropertySet();
43 mike  1.1 
44               MI_Uint32 GetSize() const;
45           
46               bool Contains(const String& name) const;
47           
48               bool Add(const String& name);
49           
50               bool Get(MI_Uint32 index, String& name) const;
51           
52               void Clear();
53           
54           private:
55               PropertySet();
56               PropertySet(const PropertySet&);
57               PropertySet& operator=(const PropertySet&);
58               friend const PropertySet& __PropertySet(const MI_PropertySet* propertySet);
59           
60               MI_PropertySet* _rep;
61           };
62           
63           inline PropertySet::~PropertySet()
64 mike  1.1 {
65           }
66           
67           inline const PropertySet& __PropertySet(const MI_PropertySet* propertySet)
68           {
69               PropertySet* ptr = reinterpret_cast<PropertySet*>(
70                   const_cast<MI_PropertySet**>(&propertySet));
71               return *ptr;
72           }
73           
74           MI_END_NAMESPACE
75           
76           #endif /* _micxx_propertyset_h */

ViewCVS 0.9.2