1 #ifndef INCLUDE_ORA_QUERYABLEVECTORIMPL_H
2 #define INCLUDE_ORA_QUERYABLEVECTORIMPL_H
46 return m_vecIterator->first;
50 return &m_vecIterator->second;
54 return m_vecIterator->second;
97 return m_vecIterator->first;
101 return &m_vecIterator->second;
105 return m_vecIterator->second;
144 return m_data->size();
148 return m_data->front().first;
152 return m_data->back().first;
164 m_selection( rhs.m_selection),
165 m_loader( rhs.m_loader ){
177 m_selection.addDataItem(dataMemberName, stype, selectionData);
181 return m_loader->getSelectionCount( m_selection );
186 boost::shared_ptr<range_store_base_type> newData (
new range_store_base_type );
187 m_loader->loadSelection( m_selection, newData.get());
199 m_data(new
PVector<Tp>(n,value)),
207 m_isLocked(rhs.m_isLocked),
208 m_isLoaded(rhs.m_isLoaded),
209 m_loader( rhs.m_loader ){
233 throwException(
"The Vector is locked in writing mode, cannot make queries.",
"ora::QueryableVector<Tp>::select");
236 throwException(
"The Loader is not installed.",
"ora::QueryableVector<Tp>::select");
239 boost::shared_ptr<range_store_base_type> newData (
new range_store_base_type );
240 m_loader->loadSelection( sel, newData.get());
246 throwException(
"The Vector is locked in writing mode, cannot make queries.",
"ora::QueryableVector<Tp>::query");
249 throwException(
"The Loader is not installed.",
"ora::QueryableVector<Tp>::query");
255 bool wasLocked = m_isLocked;
266 return m_data->begin();
271 return m_data->end();
276 return m_data->begin();
281 return m_data->end();
286 return m_data->rbegin();
291 return m_data->rend();
296 return m_data->rbegin();
301 return m_data->rend();
306 return m_data->size();
311 return m_data->max_size();
316 m_data->resize(n,value);
321 return m_data->capacity();
326 return m_data->empty();
336 return m_data->operator[](
n);
341 return m_data->operator[](
n);
346 return m_data->operator[](
n);
351 return m_data->operator[](
n);
356 return m_data->front();
361 return m_data->front();
365 return m_data->back();
370 return m_data->back();
381 m_data->push_back(x);
406 return m_data->operator==(*vec.
m_data);
412 return m_data->operator!=(*vec.
m_data);
418 return m_data->persistentSize();
430 if(m_loader.get() && !m_isLocked && !m_isLoaded){
431 m_loader->load(m_data.get());
bool operator!=(const RangeReverseIterator &rhs) const
static AlgebraicMatrix initialize()
RangeReverseIterator(embedded_iterator vectorIterator)
bool operator!=(const RangeIterator &rhs) const
bool operator==(const RangeReverseIterator &rhs) const
size_t persistentSize() const
void addSelection(const std::string &dataMemberName, SelectionItemType stype, Prim selectionData)
QueryableVector< Tp > & operator=(const QueryableVector< Tp > &rhs)
bool operator!=(const QueryableVector &vec) const
Range< Tp > select(int startIndex, int endIndex=Selection::endOfRange) const
const void * storageAddress() const
RangeReverseIterator & operator=(const RangeReverseIterator &rhs)
RangeReverseIterator operator+(int i)
reference operator[](size_t n)
PVector< Tp >::iterator iterator
RangeIterator operator-(int i)
boost::shared_ptr< store_base_type > m_data
void resize(size_t n, const Tp &value=Tp())
std::vector< std::pair< size_t, Tp > > store_base_type
const Tp * operator->() const
const Tp * operator->() const
virtual ~RangeReverseIterator()
void assign(size_t n, const Tp &u)
RangeIterator & operator++()
boost::shared_ptr< IVectorLoader > m_loader
RangeIterator(embedded_iterator vectorIterator)
std::vector< std::pair< size_t, Tp > >::const_reverse_iterator embedded_iterator
bool operator==(const RangeIterator &rhs) const
reverse_iterator rbegin()
void push_back(const Tp &x)
boost::shared_ptr< IVectorLoader > m_loader
RangeIterator operator+(int i)
Range & operator=(const Range &rhs)
std::vector< std::pair< size_t, Tp > > range_store_base_type
PVector< Tp >::const_reference const_reference
void addIndexItem(int startIndex, int endIndex=endOfRange)
Query & operator=(const Query< Tp > &rhs)
embedded_iterator m_vecIterator
embedded_iterator m_vecIterator
RangeReverseIterator operator-(int i)
reverse_iterator rbegin() const
reverse_iterator rend() const
void throwException(const std::string &message, const std::string &methodName) __attribute__((noreturn))
virtual ~QueryableVector()
const Tp & operator*() const
const Tp & operator*() const
char data[epos_bytes_allocation]
PVector< Tp >::reference reference
bool operator==(const QueryableVector &vec) const
size_t frontIndex() const
PVector< Tp >::const_iterator const_iterator
volatile std::atomic< bool > shutdown_flag false
boost::shared_ptr< store_base_type > m_data
Query(boost::shared_ptr< IVectorLoader > &loader)
RangeIterator & operator=(const RangeIterator &rhs)
RangeReverseIterator & operator++()
Query< Tp > query() const
PVector< Tp >::reverse_iterator reverse_iterator
PVector< Tp >::const_reverse_iterator const_reverse_iterator