OnixS BME SENAF Handler C++ library  2.2.1
API documentation
ArrayRef< ItemType, SizeType > Class Template Reference

#include <OnixS/Senaf/MarketData/Containers.h>

Public Types

typedef ItemType Item
 
typedef ItemType * Iterator
 
typedef SizeType Index
 
typedef SizeType Size
 

Public Member Functions

 ArrayRef ()
 
 ArrayRef (Item *const items, const Size itemsCount)
 
template<typename OtherItem , typename OtherSize >
 ArrayRef (const ArrayRef< OtherItem, OtherSize > &other)
 
template<typename OtherItem , typename OtherSize >
ArrayRefoperator= (const ArrayRef< OtherItem, OtherSize > &other)
 
 ~ArrayRef ()
 
bool empty () const
 
Size size () const
 
Itemitems () const
 
Iterator begin () const
 
Iterator end () const
 
Itemoperator[] (Index index) const
 
Itemat (const Index index) const
 
void reset (Item *const items=0, const Size size=0)
 

Protected Attributes

Itemitems_
 
Size size_
 

Detailed Description

template<typename ItemType, typename SizeType>
class OnixS::Senaf::MarketData::ArrayRef< ItemType, SizeType >

Represents reference to segment of built-in array of items.

Definition at line 31 of file Containers.h.

Member Typedef Documentation

typedef SizeType Index

Definition at line 37 of file Containers.h.

typedef ItemType Item

Definition at line 34 of file Containers.h.

typedef ItemType* Iterator

Definition at line 35 of file Containers.h.

typedef SizeType Size

Definition at line 38 of file Containers.h.

Constructor & Destructor Documentation

ArrayRef ( )
inline

Initializes instance referencing to nothing.

Definition at line 41 of file Containers.h.

ArrayRef ( Item *const  items,
const Size  itemsCount 
)
inline

Initializes instance referencing to given data.

Definition at line 48 of file Containers.h.

ArrayRef ( const ArrayRef< OtherItem, OtherSize > &  other)
inline

Initializes instance as copy of other one.

Definition at line 56 of file Containers.h.

~ArrayRef ( )
inline

Destructs the instance.

Definition at line 73 of file Containers.h.

Member Function Documentation

Item& at ( const Index  index) const
inline

Accesses to item by index checking access bounds.

Definition at line 112 of file Containers.h.

Iterator begin ( ) const
inline

Iterator referencing to the first item.

Definition at line 94 of file Containers.h.

bool empty ( ) const
inline

Indicates whether array has no items.

Definition at line 76 of file Containers.h.

Iterator end ( ) const
inline

Iterator referencing to the item behind the last item.

Definition at line 100 of file Containers.h.

Item* items ( ) const
inline

Gets raw pointer to items.

Definition at line 88 of file Containers.h.

ArrayRef& operator= ( const ArrayRef< OtherItem, OtherSize > &  other)
inline

Re-initializes instance as copy of the other one.

Definition at line 64 of file Containers.h.

Item& operator[] ( Index  index) const
inline

Accesses to item by index.

Definition at line 106 of file Containers.h.

void reset ( Item *const  items = 0,
const Size  size = 0 
)
inline

Resets array with new items and size.

Definition at line 123 of file Containers.h.

Size size ( ) const
inline

Number of items being referenced.

Definition at line 82 of file Containers.h.

Member Data Documentation

Item* items_
protected

Definition at line 130 of file Containers.h.

Size size_
protected

Definition at line 131 of file Containers.h.


The documentation for this class was generated from the following file: