~ubuntu-branches/ubuntu/trusty/opendrim-lmp-physicalasset/trusty

« back to all changes in this revision

Viewing changes to OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement/OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement.h

  • Committer: Bazaar Package Importer
  • Author(s): Guillaume BOTTEX
  • Date: 2009-08-19 16:14:02 UTC
  • Revision ID: james.westby@ubuntu.com-20090819161402-4yw0gish6vphwt15
Tags: upstream-0.1.1
ImportĀ upstreamĀ versionĀ 0.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*###############################################################################
 
2
# Linux Management Providers (LMP), Physical Asset provider package
 
3
# Copyright (C) 2008 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr, guillaumebottex@gmail.com>
 
4
#
 
5
# This program is being developed under the "OpenDRIM" project.
 
6
# The "OpenDRIM" project web page: http://opendrim.sourceforge.net
 
7
# The "OpenDRIM" project mailing list: opendrim@googlegroups.com
 
8
#
 
9
# This program is free software; you can redistribute it and/or
 
10
# modify it under the terms of the GNU General Public License
 
11
# as published by the Free Software Foundation; version 2
 
12
# of the License.
 
13
#
 
14
# This program is distributed in the hope that it will be useful,
 
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
# GNU General Public License for more details.
 
18
#
 
19
# You should have received a copy of the GNU General Public License
 
20
# along with this program; if not, write to the Free Software
 
21
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
22
#################################################################################
 
23
 
 
24
#################################################################################
 
25
# To contributors, please leave your contact information in this section
 
26
# AND comment your changes in the source code.
 
27
#
 
28
# Modified by <Author(s)>, <Affiliation>, <Year>
 
29
###############################################################################*/
 
30
 
 
31
#ifndef OPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_
 
32
#define OPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_
 
33
 
 
34
#include <Association.h>
 
35
 
 
36
// Direct Invocation includes, may have to be adjusted
 
37
/*
 
38
#include "cmpiCIM_Capabilities.h"
 
39
#include "CIM_CapabilitiesAccess.h"
 
40
#include "cmpiCIM_ManagedElement.h"
 
41
#include "CIM_ManagedElementAccess.h"
 
42
*/
 
43
 
 
44
const static char* OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_classnames[] = {"OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement"};
 
45
static string OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement_NAMESPACE = _NAMESPACE;
 
46
const static string Capabilities_role = "Capabilities";
 
47
const static char* Capabilities_classnames[] = {"CIM_Capabilities"};
 
48
const static string Capabilities_NAMESPACE = _NAMESPACE;
 
49
 
 
50
const static string ManagedElement_role = "ManagedElement";
 
51
const static char* ManagedElement_classnames[] = {"CIM_ManagedElement"};
 
52
const static string ManagedElement_NAMESPACE = _NAMESPACE;
 
53
 
 
54
class OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement {
 
55
 
 
56
public:
 
57
        
 
58
        Objectpath ManagedElement;
 
59
        bool ManagedElement_isNULL;
 
60
        
 
61
        Objectpath Capabilities;
 
62
        bool Capabilities_isNULL;
 
63
        
 
64
        vector<unsigned short> Characteristics;
 
65
        bool Characteristics_isNULL;
 
66
        
 
67
        OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement() {
 
68
                ManagedElement_isNULL = true;
 
69
                Capabilities_isNULL = true;
 
70
                Characteristics_isNULL = true;
 
71
        }
 
72
        
 
73
        ~OpenDRIM_PhysicalAssetCapabilitiesToPhysicalElement() {}
 
74
        
 
75
        string getKeys() const {
 
76
                return CF_toLowCase(".ManagedElement=\"" + CF_quoteString(ManagedElement.toString()) + "\""".Capabilities=\"" + CF_quoteString(Capabilities.toString()) + "\"");
 
77
        }
 
78
 
 
79
        int getManagedElement(Objectpath& value) const {
 
80
                if (ManagedElement_isNULL==true)
 
81
                        return NOT_FOUND;
 
82
                value = ManagedElement;
 
83
                return OK;
 
84
        }
 
85
        
 
86
        int setManagedElement(const Objectpath& newValue) {
 
87
                ManagedElement = newValue;
 
88
                ManagedElement.setNamespace(ManagedElement_NAMESPACE);
 
89
                ManagedElement_isNULL = false;
 
90
                return OK;
 
91
        }
 
92
 
 
93
        int getCapabilities(Objectpath& value) const {
 
94
                if (Capabilities_isNULL==true)
 
95
                        return NOT_FOUND;
 
96
                value = Capabilities;
 
97
                return OK;
 
98
        }
 
99
        
 
100
        int setCapabilities(const Objectpath& newValue) {
 
101
                Capabilities = newValue;
 
102
                Capabilities.setNamespace(Capabilities_NAMESPACE);
 
103
                Capabilities_isNULL = false;
 
104
                return OK;
 
105
        }
 
106
 
 
107
        int getCharacteristics(vector<unsigned short>& value) const {
 
108
                if (Characteristics_isNULL==true)
 
109
                        return NOT_FOUND;
 
110
                value = Characteristics;
 
111
                return OK;
 
112
        }
 
113
        
 
114
        int setCharacteristics(const vector<unsigned short>& newValue) {
 
115
                Characteristics = newValue;
 
116
                Characteristics_isNULL = false;
 
117
                return OK;
 
118
        }
 
119
 
 
120
};
 
121
 
 
122
#endif /*OPENDRIM_PHYSICALASSETCAPABILITIESTOPHYSICALELEMENT_H_*/