5#ifndef TRTCONDITIONSDATA_FLOATARRAYSTORE_H
6#define TRTCONDITIONSDATA_FLOATARRAYSTORE_H
27#include "Identifier/Identifier.h"
37 typedef std::less<Identifier>
lessp;
40 typedef std::vector< std::vector<float> >
Buffer;
51 const std::string&
tag()
const;
72 void push_back(
const std::vector<Identifier>& identvec,
const std::vector<float>& value);
103 m_tag=std::move(other.m_tag);
105 m_buf=std::move(other.m_buf);
116 (
const Identifier& ident,
const std::vector<float>& value){
117 m_buf.push_back(value);
122 m_buf.push_back(value);
124 for(std::vector<Identifier>::const_iterator it = identvec.begin() ; it != identvec.end(); ++it)
139inline const std::vector<float>& FloatArrayStore::operator[]
macros to associate a CLID to a type
#define CLASS_DEF(NAME, CID, VERSION)
associate a clid and a version to a type eg
std::ostream & operator<<(std::ostream &os, const FloatArrayStore &store)
std::istream & operator>>(std::istream &is, FloatArrayStore &store)
class FloatArrayStore Access and manipulate an indexed storage of float vectors
bool sharedID(const Identifier &ident) const
returns flag for index sharing data
const Buffer & buffer() const
return stored vector
map_citr cbegin() const
begin/end const iterators
int numberOfIDs() const
Size accessor.
void cleanUp()
remove data with no index pointing to it
FloatArrayStore & operator=(FloatArrayStore &&other)
move assignment
std::vector< std::vector< float > > Buffer
const std::vector< float > & operator[](const Identifier &ident) const
Overload [] const access.
void share(const Identifier &ident, const Identifier &referenceIdent)
makes index ident share data with referenceIdent
BufferMap::const_iterator map_citr
std::string m_tag
The tag std::string.
BufferMap m_bufmap
The std::map.
map_citr begin() const
begin/end iterators
std::map< Identifier, int, lessp > BufferMap
FloatArrayStore()
constructors, optionally with a tag
bool existID(const Identifier &ident) const
returns flag for index existing in the std::map
void push_back(const Identifier &ident, const std::vector< float > &value)
makes new indices
void removeID(const Identifier &ident)
remove new index
virtual ~FloatArrayStore()
destructor
void dbg() const
print method
std::less< Identifier > lessp
const std::string & tag() const
Tag accessor.
Buffer m_buf
The std::vector<float> stored in each second element.