ValueStore.h
Go to the documentation of this file.
//-----------------------------------------------------------------------------
//
// ValueStore.h
//
// Container for Value objects
//
// Copyright (c) 2010 Mal Lansell <openzwave@lansell.org>
//
// SOFTWARE NOTICE AND LICENSE
//
// This file is part of OpenZWave.
//
// OpenZWave is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published
// by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// OpenZWave 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 Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenZWave. If not, see <http://www.gnu.org/licenses/>.
//
//-----------------------------------------------------------------------------
#ifndef _ValueStore_H
#define _ValueStore_H
#include <map>
#include "Defs.h"
#include "value_classes/ValueID.h"
class TiXmlElement;
namespace OpenZWave
{
class Value;
class ValueStore
{
public:
typedef map<uint32,Value*>::const_iterator Iterator;
Iterator Begin(){ return m_values.begin(); }
Iterator End(){ return m_values.end(); }
ValueStore(){}
~ValueStore();
bool AddValue( Value* _value );
bool RemoveValue( uint32 const& _key );
Value* GetValue( uint32 const& _key )const;
void RemoveCommandClassValues( uint8 const _commandClassId ); // Remove all the values associated with a command class
private:
map<uint32,Value*> m_values;
};
} // namespace OpenZWave
#endif
OpenZWave::ValueStore::End
Iterator End()
Definition: ValueStore.h:50
OpenZWave
Definition: Bitfield.h:34
OpenZWave::ValueStore
Container that holds all of the values associated with a given node.
Definition: ValueStore.h:43
OpenZWave::ValueStore::Iterator
map< uint32, Value * >::const_iterator Iterator
Definition: ValueStore.h:47
OpenZWave::ValueStore::~ValueStore
~ValueStore()
Definition: ValueStore.cpp:41
OpenZWave::ValueStore::RemoveValue
bool RemoveValue(uint32 const &_key)
Definition: ValueStore.cpp:94
Defs.h
OpenZWave::ValueStore::AddValue
bool AddValue(Value *_value)
Definition: ValueStore.cpp:58
OpenZWave::ValueStore::GetValue
Value * GetValue(uint32 const &_key) const
Definition: ValueStore.cpp:175
ValueID.h
uint32
unsigned int uint32
Definition: Defs.h:80
OpenZWave::ValueStore::RemoveCommandClassValues
void RemoveCommandClassValues(uint8 const _commandClassId)
Definition: ValueStore.cpp:138
OpenZWave::ValueStore::ValueStore
ValueStore()
Definition: ValueStore.h:52
OpenZWave::Value
Base class for values associated with a node.
Definition: Value.h:47
OpenZWave::ValueStore::Begin
Iterator Begin()
Definition: ValueStore.h:49
uint8
unsigned char uint8
Definition: Defs.h:74