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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
/*###############################################################################
# Linux Management Providers (LMP), Physical Asset provider package
# Copyright (C) 2008 Guillaume BOTTEX, ETRI <guillaumebottex@etri.re.kr, guillaumebottex@gmail.com>
#
# This program is being developed under the "OpenDRIM" project.
# The "OpenDRIM" project web page: http://opendrim.sourceforge.net
# The "OpenDRIM" project mailing list: opendrim@googlegroups.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#################################################################################

#################################################################################
# To contributors, please leave your contact information in this section
# AND comment your changes in the source code.
#
# Modified by <Author(s)>, <Affiliation>, <Year>
###############################################################################*/

#ifndef OPENDRIM_PHYSICALELEMENTPACKAGE_H_
#define OPENDRIM_PHYSICALELEMENTPACKAGE_H_

#include <Association.h>

// Direct Invocation includes, may have to be adjusted
/*
#include "cmpiCIM_PhysicalElement.h"
#include "CIM_PhysicalElementAccess.h"
#include "cmpiCIM_PhysicalPackage.h"
#include "CIM_PhysicalPackageAccess.h"
*/

const static char* OpenDRIM_PhysicalElementPackage_classnames[] = {"OpenDRIM_PhysicalElementPackage"};
static string OpenDRIM_PhysicalElementPackage_NAMESPACE = _NAMESPACE;
const static string PartComponent_role = "PartComponent";
const static char* PartComponent_classnames[] = {"CIM_PhysicalElement"};
const static string PartComponent_NAMESPACE = _NAMESPACE;

const static string GroupComponent_role = "GroupComponent";
const static char* GroupComponent_classnames[] = {"CIM_PhysicalPackage"};
const static string GroupComponent_NAMESPACE = _NAMESPACE;

class OpenDRIM_PhysicalElementPackage {

public:
	
	Objectpath GroupComponent;
	bool GroupComponent_isNULL;
	
	Objectpath PartComponent;
	bool PartComponent_isNULL;
	
	string LocationWithinContainer;
	bool LocationWithinContainer_isNULL;
	
	OpenDRIM_PhysicalElementPackage() {
		GroupComponent_isNULL = true;
		PartComponent_isNULL = true;
		LocationWithinContainer_isNULL = true;
	}
	
	~OpenDRIM_PhysicalElementPackage() {}
	
	string getKeys() const {
		return CF_toLowCase(".GroupComponent=\"" + CF_quoteString(GroupComponent.toString()) + "\""".PartComponent=\"" + CF_quoteString(PartComponent.toString()) + "\"");
	}

	int getGroupComponent(Objectpath& value) const {
		if (GroupComponent_isNULL==true)
			return NOT_FOUND;
		value = GroupComponent;
		return OK;
	}
	
	int setGroupComponent(const Objectpath& newValue) {
		GroupComponent = newValue;
		GroupComponent.setNamespace(GroupComponent_NAMESPACE);
		GroupComponent_isNULL = false;
		return OK;
	}

	int getPartComponent(Objectpath& value) const {
		if (PartComponent_isNULL==true)
			return NOT_FOUND;
		value = PartComponent;
		return OK;
	}
	
	int setPartComponent(const Objectpath& newValue) {
		PartComponent = newValue;
		PartComponent.setNamespace(PartComponent_NAMESPACE);
		PartComponent_isNULL = false;
		return OK;
	}

	int getLocationWithinContainer(string& value) const {
		if (LocationWithinContainer_isNULL==true)
			return NOT_FOUND;
		value = LocationWithinContainer;
		return OK;
	}
	
	int setLocationWithinContainer(const string& newValue) {
		LocationWithinContainer = newValue;
		LocationWithinContainer_isNULL = false;
		return OK;
	}

};

#endif /*OPENDRIM_PHYSICALELEMENTPACKAGE_H_*/