CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
ora::Query< Tp > Class Template Reference

#include <QueryableVector.h>

Public Member Functions

template<typename Prim >
void addSelection (const std::string &dataMemberName, SelectionItemType stype, Prim selectionData)
 
size_t count ()
 
Range< Tp > execute ()
 
Queryoperator= (const Query< Tp > &rhs)
 
 Query (boost::shared_ptr< IVectorLoader > &loader)
 
 Query (const Query< Tp > &rhs)
 
virtual ~Query ()
 

Private Attributes

boost::shared_ptr< IVectorLoaderm_loader
 
Selection m_selection
 

Detailed Description

template<typename Tp>
class ora::Query< Tp >

Definition at line 140 of file QueryableVector.h.

Constructor & Destructor Documentation

template<typename Tp>
ora::Query< Tp >::Query ( boost::shared_ptr< IVectorLoader > &  loader)
explicit
template<class Tp >
ora::Query< Tp >::Query ( const Query< Tp > &  rhs)

Definition at line 163 of file QueryableVectorImpl.h.

163  :
164  m_selection( rhs.m_selection),
165  m_loader( rhs.m_loader ){
166 }
Selection m_selection
boost::shared_ptr< IVectorLoader > m_loader
template<typename Tp>
virtual ora::Query< Tp >::~Query ( )
inlinevirtual

Definition at line 148 of file QueryableVector.h.

148  {
149  }

Member Function Documentation

template<class Tp >
template<typename Prim >
void ora::Query< Tp >::addSelection ( const std::string &  dataMemberName,
ora::SelectionItemType  stype,
Prim  selectionData 
)

Definition at line 176 of file QueryableVectorImpl.h.

176  {
177  m_selection.addDataItem(dataMemberName, stype, selectionData);
178 }
void addDataItem(const std::string &dataMemberName, SelectionItemType stype, Prim selectionData)
Definition: Selection.h:60
Selection m_selection
template<class Tp >
size_t ora::Query< Tp >::count ( void  )

Definition at line 180 of file QueryableVectorImpl.h.

180  {
181  return m_loader->getSelectionCount( m_selection );
182 }
Selection m_selection
boost::shared_ptr< IVectorLoader > m_loader
template<class Tp >
ora::Range< Tp > ora::Query< Tp >::execute ( )

Definition at line 184 of file QueryableVectorImpl.h.

184  {
185  typedef typename Range<Tp>::store_base_type range_store_base_type;
186  boost::shared_ptr<range_store_base_type> newData ( new range_store_base_type );
187  m_loader->loadSelection( m_selection, newData.get());
188  return Range<Tp>( newData );
189 }
Selection m_selection
boost::shared_ptr< IVectorLoader > m_loader
template<class Tp >
ora::Query< Tp > & ora::Query< Tp >::operator= ( const Query< Tp > &  rhs)

Definition at line 169 of file QueryableVectorImpl.h.

References ora::Query< Tp >::m_loader, and ora::Query< Tp >::m_selection.

169  {
170  m_selection = rhs.m_selection;
171  m_loader = rhs.m_loader;
172  return *this;
173 }
Selection m_selection
boost::shared_ptr< IVectorLoader > m_loader

Member Data Documentation

template<typename Tp>
boost::shared_ptr<IVectorLoader> ora::Query< Tp >::m_loader
private

Definition at line 159 of file QueryableVector.h.

Referenced by ora::Query< Tp >::operator=().

template<typename Tp>
Selection ora::Query< Tp >::m_selection
private

Definition at line 158 of file QueryableVector.h.

Referenced by ora::Query< Tp >::operator=().