OpenZWave Library
1.4.0
Toggle main menu visibility
Loading...
Searching...
No Matches
cpp
src
value_classes
ValueStore.h
Go to the documentation of this file.
1
//-----------------------------------------------------------------------------
2
//
3
// ValueStore.h
4
//
5
// Container for Value objects
6
//
7
// Copyright (c) 2010 Mal Lansell <openzwave@lansell.org>
8
//
9
// SOFTWARE NOTICE AND LICENSE
10
//
11
// This file is part of OpenZWave.
12
//
13
// OpenZWave is free software: you can redistribute it and/or modify
14
// it under the terms of the GNU Lesser General Public License as published
15
// by the Free Software Foundation, either version 3 of the License,
16
// or (at your option) any later version.
17
//
18
// OpenZWave is distributed in the hope that it will be useful,
19
// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
// GNU Lesser General Public License for more details.
22
//
23
// You should have received a copy of the GNU Lesser General Public License
24
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
25
//
26
//-----------------------------------------------------------------------------
27
28
#ifndef _ValueStore_H
29
#define _ValueStore_H
30
31
#include <map>
32
#include "
Defs.h
"
33
#include "
value_classes/ValueID.h
"
34
35
class
TiXmlElement;
36
37
namespace
OpenZWave
38
{
39
class
Value
;
40
43
class
ValueStore
44
{
45
public
:
46
47
typedef
map<uint32,Value*>::const_iterator
Iterator
;
48
49
Iterator
Begin
(){
return
m_values.begin(); }
50
Iterator
End
(){
return
m_values.end(); }
51
52
ValueStore
(){}
53
~ValueStore
();
54
55
bool
AddValue
(
Value
* _value );
56
bool
RemoveValue
(
uint32
const
& _key );
57
Value
*
GetValue
(
uint32
const
& _key )
const
;
58
59
void
RemoveCommandClassValues
(
uint8
const
_commandClassId );
// Remove all the values associated with a command class
60
61
private
:
62
map<uint32,Value*> m_values;
63
};
64
65
}
// namespace OpenZWave
66
67
#endif
68
69
70
Defs.h
uint32
unsigned int uint32
Definition
Defs.h:80
uint8
unsigned char uint8
Definition
Defs.h:74
ValueID.h
OpenZWave::ValueStore
Container that holds all of the values associated with a given node.
Definition
ValueStore.h:44
OpenZWave::ValueStore::AddValue
bool AddValue(Value *_value)
Definition
ValueStore.cpp:58
OpenZWave::ValueStore::GetValue
Value * GetValue(uint32 const &_key) const
Definition
ValueStore.cpp:175
OpenZWave::ValueStore::RemoveCommandClassValues
void RemoveCommandClassValues(uint8 const _commandClassId)
Definition
ValueStore.cpp:138
OpenZWave::ValueStore::ValueStore
ValueStore()
Definition
ValueStore.h:52
OpenZWave::ValueStore::End
Iterator End()
Definition
ValueStore.h:50
OpenZWave::ValueStore::RemoveValue
bool RemoveValue(uint32 const &_key)
Definition
ValueStore.cpp:94
OpenZWave::ValueStore::Begin
Iterator Begin()
Definition
ValueStore.h:49
OpenZWave::ValueStore::Iterator
map< uint32, Value * >::const_iterator Iterator
Definition
ValueStore.h:47
OpenZWave::Value
Base class for values associated with a node.
Definition
Value.h:48
OpenZWave
Definition
Bitfield.h:35
Generated on
for OpenZWave Library by
1.18.0