CACAO
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends
cacao::jit::compiler2::SegRef< Tag, RefCategory > Class Template Reference

Segment reference. More...

Public Types

typedef RefCategory ref_category
 
typedef Segment< Tag,
RefCategory >::IdxTy 
IdxTy
 

Public Member Functions

 SegRef (const SegRef< Tag, RefCategory > &other)
 Copy Constructor. More...
 
SegRefoperator= (const SegRef< Tag, RefCategory > &other)
 Copy assignment operator. More...
 
SegRef operator+ (std::size_t v)
 Get a sub-segment. More...
 
u1operator[] (std::size_t i)
 access data More...
 
u1operator[] (IdxTy i)
 
Segment< Tag, RefCategory > * get_Segment () const
 Get containing segment. More...
 
Segment< Tag, RefCategory > & get_Segment ()
 
IdxTy get_begin () const
 Get the index of the first element. More...
 
IdxTy get_end () const
 Get the index of the first element after the reference. More...
 
IdxTy get_index_begin_raw () const
 Get the raw start index. More...
 
IdxTy get_index_end_raw () const
 Get the raw end index. More...
 
std::size_t size () const
 size of the reference More...
 

Private Member Functions

 SegRef (Segment< Tag, RefCategory > *parent, IdxTy index, std::size_t _size)
 

Private Attributes

Segment< Tag, RefCategory > * parent
 
IdxTy index
 
std::size_t _size
 

Friends

class Segment< Tag, RefCategory >
 

Detailed Description

template<typename Tag, typename RefCategory>
class cacao::jit::compiler2::SegRef< Tag, RefCategory >

Segment reference.

Segment references used to write data into the Segment and for linking. Segments are position independent.

It can be used like an u1 array.

Definition at line 44 of file Segment.hpp.

Member Typedef Documentation

template<typename Tag, typename RefCategory>
typedef Segment<Tag,RefCategory>::IdxTy cacao::jit::compiler2::SegRef< Tag, RefCategory >::IdxTy

Definition at line 295 of file Segment.hpp.

template<typename Tag, typename RefCategory>
typedef RefCategory cacao::jit::compiler2::SegRef< Tag, RefCategory >::ref_category

Definition at line 294 of file Segment.hpp.

Constructor & Destructor Documentation

template<typename Tag, typename RefCategory>
cacao::jit::compiler2::SegRef< Tag, RefCategory >::SegRef ( Segment< Tag, RefCategory > *  parent,
IdxTy  index,
std::size_t  _size 
)
inlineprivate

Definition at line 300 of file Segment.hpp.

template<typename Tag, typename RefCategory>
cacao::jit::compiler2::SegRef< Tag, RefCategory >::SegRef ( const SegRef< Tag, RefCategory > &  other)
inline

Copy Constructor.

Definition at line 304 of file Segment.hpp.

Member Function Documentation

template<typename Tag, typename RefCategory>
IdxTy cacao::jit::compiler2::SegRef< Tag, RefCategory >::get_begin ( ) const
inline

Get the index of the first element.

Return the index of the first element with respect to RefCategory (i.e. the element written by operator[0]). Note that get_begin() might be greater than get_end() depending on RefCategory.

See Also
get_end()

Definition at line 343 of file Segment.hpp.

template<typename Tag, typename RefCategory>
IdxTy cacao::jit::compiler2::SegRef< Tag, RefCategory >::get_end ( ) const
inline

Get the index of the first element after the reference.

Return the index of the first element after the reference with respect to RefCategory (i.e. the element that would be written by operator[size()], which is not allowed). Note that get_begin() might be greater than get_end() depending on RefCategory.

See Also
get_begin()

Definition at line 356 of file Segment.hpp.

template<typename Tag, typename RefCategory>
IdxTy cacao::jit::compiler2::SegRef< Tag, RefCategory >::get_index_begin_raw ( ) const
inline

Get the raw start index.

This returns the begin (i.e. the lowest index) of the raw reference. It does not take the RefCategory into account. Also the assertion get_index_begin_raw() <= get_index_end_raw() always holds.

In most cases the use of get_begin() and get_end() is preferable.

See Also
get_index_end_raw()
get_begin()
get_end()

Definition at line 372 of file Segment.hpp.

template<typename Tag, typename RefCategory>
IdxTy cacao::jit::compiler2::SegRef< Tag, RefCategory >::get_index_end_raw ( ) const
inline

Get the raw end index.

This returns the end (i.e. last index plus one) of the raw reference. It does not take the RefCategory into account. Also the assertion get_index_begin_raw() <= get_index_end_raw() always holds.

In most cases the use of get_begin() and get_end() is preferable.

See Also
get_index_begin_raw()
get_begin()
get_end()

Definition at line 388 of file Segment.hpp.

template<typename Tag, typename RefCategory>
Segment<Tag,RefCategory>* cacao::jit::compiler2::SegRef< Tag, RefCategory >::get_Segment ( ) const
inline

Get containing segment.

Definition at line 328 of file Segment.hpp.

template<typename Tag, typename RefCategory>
Segment<Tag,RefCategory>& cacao::jit::compiler2::SegRef< Tag, RefCategory >::get_Segment ( )
inline

Definition at line 331 of file Segment.hpp.

template<typename Tag, typename RefCategory>
SegRef cacao::jit::compiler2::SegRef< Tag, RefCategory >::operator+ ( std::size_t  v)
inline

Get a sub-segment.

Definition at line 314 of file Segment.hpp.

template<typename Tag, typename RefCategory>
SegRef& cacao::jit::compiler2::SegRef< Tag, RefCategory >::operator= ( const SegRef< Tag, RefCategory > &  other)
inline

Copy assignment operator.

Definition at line 307 of file Segment.hpp.

template<typename Tag, typename RefCategory>
u1& cacao::jit::compiler2::SegRef< Tag, RefCategory >::operator[] ( std::size_t  i)
inline

access data

Definition at line 320 of file Segment.hpp.

template<typename Tag, typename RefCategory>
u1& cacao::jit::compiler2::SegRef< Tag, RefCategory >::operator[] ( IdxTy  i)
inline

Definition at line 324 of file Segment.hpp.

template<typename Tag, typename RefCategory>
std::size_t cacao::jit::compiler2::SegRef< Tag, RefCategory >::size ( ) const
inline

size of the reference

Definition at line 392 of file Segment.hpp.

Friends And Related Function Documentation

template<typename Tag, typename RefCategory>
friend class Segment< Tag, RefCategory >
friend

Definition at line 395 of file Segment.hpp.

Field Documentation

template<typename Tag, typename RefCategory>
std::size_t cacao::jit::compiler2::SegRef< Tag, RefCategory >::_size
private

Definition at line 299 of file Segment.hpp.

template<typename Tag, typename RefCategory>
IdxTy cacao::jit::compiler2::SegRef< Tag, RefCategory >::index
private

Definition at line 298 of file Segment.hpp.

template<typename Tag, typename RefCategory>
Segment<Tag,RefCategory>* cacao::jit::compiler2::SegRef< Tag, RefCategory >::parent
private

Definition at line 297 of file Segment.hpp.


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