1 #ifndef INCLUDE_ORA_QUERYABLEVECTORIMPL_H
2 #define INCLUDE_ORA_QUERYABLEVECTORIMPL_H
24 return m_data->cbegin();
28 return m_data->cend();
32 return m_data->crbegin();
36 return m_data->crend();
40 return m_data->size();
44 return m_data->front().first;
48 return m_data->back().first;
58 m_selection.addDataItem(dataMemberName, stype, selectionData);
62 return loader()->getSelectionCount( m_selection );
67 loader()->loadSelection( m_selection, const_cast<void*>(newData->storageAddress()) );
100 throwException(
"The Vector is locked in writing mode, cannot make queries.",
"ora::QueryableVector<Tp>::select");
103 throwException(
"The Loader is not installed.",
"ora::QueryableVector<Tp>::select");
106 loader()->loadSelection( sel, const_cast<void*>(newData->storageAddress()) );
112 throwException(
"The Vector is locked in writing mode, cannot make queries.",
"ora::QueryableVector<Tp>::query");
115 throwException(
"The Loader is not installed.",
"ora::QueryableVector<Tp>::query");
117 boost::shared_ptr<IVectorLoader> loaderH = loader();
122 bool wasLocked = m_isLocked;
133 return m_data->begin();
138 return m_data->end();
143 return m_data->cbegin();
148 return m_data->cend();
153 return m_data->rbegin();
158 return m_data->rend();
163 return m_data->crbegin();
167 return m_data->crend();
172 return m_data->size();
176 return m_data->max_size();
181 m_data->resize(n,value);
185 return m_data->capacity();
190 return m_data->empty();
199 return m_data->operator[](
n);
204 return m_data->operator[](
n);
209 return m_data->operator[](
n);
214 return m_data->operator[](
n);
218 return m_data->front();
222 return m_data->front();
226 return m_data->back();
230 return m_data->back();
240 m_data->push_back(x);
263 return m_data->operator==(*vec.
m_data);
269 return m_data->operator!=(*vec.
m_data);
275 return m_data->persistentSize();
279 return m_data->storageAddress();
287 if(hasLoader() && !m_isLocked && !m_isLoaded){
288 loader()->load(const_cast<void*>(m_data->storageAddress()));
const_reverse_iterator rbegin() const
const_iterator end() const
const_iterator begin() const
size_t persistentSize() const
void addSelection(const std::string &dataMemberName, SelectionItemType stype, Prim selectionData)
QueryableVector< Tp > & operator=(const QueryableVector< Tp > &rhs)
const Tp & const_reference
bool operator!=(const QueryableVector &vec) const
Range< Tp > select(int startIndex, int endIndex=Selection::endOfRange) const
const void * storageAddress() const
reference operator[](size_t n)
void resize(size_t n, const Tp &value=Tp())
void assign(size_t n, const Tp &u)
reverse_iterator rbegin()
void push_back(const Tp &x)
Range & operator=(const Range &rhs)
boost::shared_ptr< QueryableVectorData< Tp > > m_data
void addIndexItem(int startIndex, int endIndex=endOfRange)
virtual ~QueryableVector()
bool operator==(const QueryableVector &vec) const
size_t frontIndex() const
void throwException(const std::string &message, const std::string &methodName)
const_reverse_iterator rend() const
Query(boost::shared_ptr< IVectorLoader > &loader)
Query< Tp > query() const
boost::shared_ptr< QueryableVectorData< Tp > > m_data