ATLAS Offline Software
Loading...
Searching...
No Matches
TPIntegerVectorStorage_p2 Class Reference

Storage implementation for TP converters producing TP representation as series of ints. More...

#include <TPIntegerVector_p2.h>

Collaboration diagram for TPIntegerVectorStorage_p2:

Public Types

typedef unsigned position_type
typedef TPIntegerVector_p2::value_type value_type

Public Member Functions

 TPIntegerVectorStorage_p2 ()
size_t size () const
void grow ()
TPIntegerVector_p2 operator[] (int idx)
TPIntegerVector_p2 back ()
void reserve (size_t s)

Protected Attributes

std::vector< value_typem_data
std::vector< position_typem_endPos

Friends

class TPIntegerVector_p2

Detailed Description

Storage implementation for TP converters producing TP representation as series of ints.

This class is not accessed directly, but through a proxy class TPIntegerVector_p2 that pretends to be a standard vector<int> TP converters should be defined using TPIntegerVector_p2 as persistent representation type

Definition at line 120 of file TPIntegerVector_p2.h.

Member Typedef Documentation

◆ position_type

Definition at line 127 of file TPIntegerVector_p2.h.

◆ value_type

Constructor & Destructor Documentation

◆ TPIntegerVectorStorage_p2()

TPIntegerVectorStorage_p2::TPIntegerVectorStorage_p2 ( )
inline

Definition at line 125 of file TPIntegerVector_p2.h.

125{}

Member Function Documentation

◆ back()

TPIntegerVector_p2 TPIntegerVectorStorage_p2::back ( )
inline

Definition at line 144 of file TPIntegerVector_p2.h.

144 {
145 return TPIntegerVector_p2( this, size()-1 );
146 }

◆ grow()

void TPIntegerVectorStorage_p2::grow ( )
inline

Definition at line 134 of file TPIntegerVector_p2.h.

134 {
135 position_type pos = size()? m_endPos.back() : 0;
136 m_endPos.push_back( pos );
137 m_endPos.push_back( pos );
138 }
std::vector< position_type > m_endPos

◆ operator[]()

TPIntegerVector_p2 TPIntegerVectorStorage_p2::operator[] ( int idx)
inline

Definition at line 140 of file TPIntegerVector_p2.h.

140 {
141 return TPIntegerVector_p2( this, idx );
142 }

◆ reserve()

void TPIntegerVectorStorage_p2::reserve ( size_t s)
inline

Definition at line 148 of file TPIntegerVector_p2.h.

148 {
149 m_endPos.reserve( s<<1 );
150 }

◆ size()

size_t TPIntegerVectorStorage_p2::size ( ) const
inline

Definition at line 130 of file TPIntegerVector_p2.h.

130 {
131 return m_endPos.size() >> 1;
132 }

◆ TPIntegerVector_p2

friend class TPIntegerVector_p2
friend

Definition at line 123 of file TPIntegerVector_p2.h.

Member Data Documentation

◆ m_data

std::vector<value_type> TPIntegerVectorStorage_p2::m_data
protected

Definition at line 153 of file TPIntegerVector_p2.h.

◆ m_endPos

std::vector<position_type> TPIntegerVectorStorage_p2::m_endPos
protected

Definition at line 154 of file TPIntegerVector_p2.h.


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