CatapultServer
v0.5.0.1 (Elephant)
|
Represents a range of entities. More...
Classes | |
class | iterator |
Entity range iterator. More... | |
class | MultiBufferRange |
class | SingleBufferRange |
class | SingleEntityRange |
class | SubRange |
Public Types | |
using | value_type = TEntity |
Public Member Functions | |
EntityRange () | |
Creates an empty entity range. More... | |
bool | empty () const |
Gets a value indicating whether or not this range is empty. More... | |
size_t | size () const |
Gets the size of this range. More... | |
size_t | totalSize () const |
Gets the total size of the range in bytes. More... | |
auto | cbegin () const |
Returns a const iterator that represents the first entity. More... | |
auto | cend () const |
Returns a const iterator that represents one past the last entity. More... | |
auto | begin () const |
Returns a const iterator that represents the first entity. More... | |
auto | end () const |
Returns a const iterator that represents one past the last entity. More... | |
auto | begin () |
Returns an iterator that represents the first entity. More... | |
auto | end () |
Returns an iterator that represents one past the last entity. More... | |
const auto * | data () const |
auto * | data () |
Public Member Functions inherited from catapult::utils::MoveOnly | |
constexpr | MoveOnly ()=default |
Default constructor. More... | |
~MoveOnly ()=default | |
Default destructor. More... | |
MoveOnly (const NonCopyable &)=delete | |
Disabled copy constructor. More... | |
MoveOnly (MoveOnly &&)=default | |
Default move constructor. More... | |
MoveOnly & | operator= (const MoveOnly &)=delete |
Disabled assignment operator. More... | |
MoveOnly & | operator= (MoveOnly &&)=default |
Default move assignment operator. More... | |
Static Public Member Functions | |
static EntityRange | PrepareFixed (size_t numElements, uint8_t **ppRangeData=nullptr) |
static EntityRange | CopyFixed (const uint8_t *pData, size_t numElements) |
Creates an entity range around numElements fixed size elements pointed to by pData. More... | |
static EntityRange | CopyVariable (const uint8_t *pData, size_t dataSize, const std::vector< size_t > &offsets) |
static EntityRange | FromEntity (std::unique_ptr< TEntity > &&pEntity) |
Creates an entity range around a single entity (pEntity). More... | |
static EntityRange | MergeRanges (std::vector< EntityRange > &&ranges) |
Merges all ranges into a single range. More... | |
static EntityRange | CopyRange (const EntityRange &rhs) |
Creates an entity range by making a copy of an existing range rhs. More... | |
static std::vector< std::shared_ptr< TEntity > > | ExtractEntitiesFromRange (EntityRange &&range) |
Private Member Functions | |
EntityRange (SingleBufferRange &&subRange) | |
EntityRange (SingleEntityRange &&subRange) | |
EntityRange (MultiBufferRange &&subRange) | |
void | requireContiguousData () const |
const SubRange & | subRange () const |
SubRange & | subRange () |
auto | copySubRange () const |
auto | detachSubRangeEntities () |
template<typename TFunc > | |
auto | activeSubRangeAction (TFunc func) const |
template<typename TFunc > | |
auto | activeSubRangeAction (TFunc func) |
Static Private Member Functions | |
template<typename TIterator > | |
static auto | make_const_iterator (TIterator current) |
template<typename TIterator > | |
static auto | make_iterator (TIterator current) |
Private Attributes | |
SingleBufferRange | m_singleBufferRange |
SingleEntityRange | m_singleEntityRange |
MultiBufferRange | m_multiBufferRange |
Friends | |
class | MultiBufferRange |
Represents a range of entities.
using catapult::model::EntityRange< TEntity >::value_type = TEntity |
|
inline |
Creates an empty entity range.
|
inlineexplicitprivate |
|
inlineexplicitprivate |
|
inlineexplicitprivate |
|
inlineprivate |
|
inlineprivate |
|
inline |
Returns an iterator that represents the first entity.
|
inline |
Returns a const iterator that represents the first entity.
|
inline |
Returns a const iterator that represents the first entity.
|
inline |
Returns a const iterator that represents one past the last entity.
|
inlinestatic |
Creates an entity range around numElements fixed size elements pointed to by pData.
|
inlinestatic |
Creates an entity range by making a copy of an existing range rhs.
|
inlineprivate |
|
inlinestatic |
Creates an entity range around the data pointed to by pData with size dataSize and an offsets container that contains values indicating the starting position of all entities in the data.
|
inline |
Gets a pointer to the start of the data range.
|
inline |
Gets a const pointer to the start of the data range.
|
inlineprivate |
|
inline |
Gets a value indicating whether or not this range is empty.
|
inline |
Returns an iterator that represents one past the last entity.
|
inline |
Returns a const iterator that represents one past the last entity.
|
inlinestatic |
Extracts a vector of entities from a range such that each entity will extend the lifetime of the owning range.
|
inlinestatic |
Creates an entity range around a single entity (pEntity).
|
inlinestaticprivate |
|
inlinestaticprivate |
|
inlinestatic |
Merges all ranges into a single range.
|
inlinestatic |
Creates an uninitialized entity range of contiguous memory around numElements fixed size elements. ppRangeData is set to point to the range memory.
|
inlineprivate |
|
inline |
Gets the size of this range.
|
inlineprivate |
|
inlineprivate |
|
inline |
Gets the total size of the range in bytes.
|
friend |
|
private |
|
private |
|
private |