ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

Common::SpanOwner< OwnedSpan > Class Template Reference

Similar to ScopedPtr, but allows holding and disposing pointers inside Spans without requiring an additional pointer to data, and with copyability. More...

#include <span.h>

Inheritance diagram for Common::SpanOwner< OwnedSpan >:
Collaboration diagram for Common::SpanOwner< OwnedSpan >:

List of all members.

Public Member Functions

 SpanOwner ()
 SpanOwner (const OwnedSpan &span)
 SpanOwner (const SpanOwner &other)
 Creates a new owned copy of the memory from the other SpanOwner.
SpanOwneroperator= (const SpanOwner &other)
 ~SpanOwner ()
SpanOwnermoveFrom (SpanOwner &other)
 Transfers ownership of the Span from the other owner to this owner.
pointer release ()
 Releases the memory owned by this SpanOwner to the caller.
void clear ()
 Destroys the memory owned by this owner.
const OwnedSpan & operator* () const
OwnedSpan & operator* ()
const OwnedSpan * operator-> () const
OwnedSpan * operator-> ()
const_reference operator[] (const index_type index) const
reference operator[] (const index_type index)

Protected Member Functions

bool operator_bool () const

Private Types

typedef OwnedSpan::value_type value_type
typedef OwnedSpan::size_type size_type
typedef OwnedSpan::index_type index_type
typedef OwnedSpan::pointer pointer
typedef OwnedSpan::reference reference
typedef OwnedSpan::const_reference const_reference

Private Attributes

OwnedSpan _span

Friends

struct SafeBool

Detailed Description

template<typename OwnedSpan>
class Common::SpanOwner< OwnedSpan >

Similar to ScopedPtr, but allows holding and disposing pointers inside Spans without requiring an additional pointer to data, and with copyability.

Definition at line 915 of file span.h.


Member Typedef Documentation

template<typename OwnedSpan >
typedef OwnedSpan::const_reference Common::SpanOwner< OwnedSpan >::const_reference [private]

Definition at line 921 of file span.h.

template<typename OwnedSpan >
typedef OwnedSpan::index_type Common::SpanOwner< OwnedSpan >::index_type [private]

Definition at line 918 of file span.h.

template<typename OwnedSpan >
typedef OwnedSpan::pointer Common::SpanOwner< OwnedSpan >::pointer [private]

Definition at line 919 of file span.h.

template<typename OwnedSpan >
typedef OwnedSpan::reference Common::SpanOwner< OwnedSpan >::reference [private]

Definition at line 920 of file span.h.

template<typename OwnedSpan >
typedef OwnedSpan::size_type Common::SpanOwner< OwnedSpan >::size_type [private]

Definition at line 917 of file span.h.

template<typename OwnedSpan >
typedef OwnedSpan::value_type Common::SpanOwner< OwnedSpan >::value_type [private]

Definition at line 916 of file span.h.


Constructor & Destructor Documentation

template<typename OwnedSpan >
Common::SpanOwner< OwnedSpan >::SpanOwner (  )  [inline]

Definition at line 928 of file span.h.

template<typename OwnedSpan >
Common::SpanOwner< OwnedSpan >::SpanOwner ( const OwnedSpan &  span  )  [inline]

Definition at line 930 of file span.h.

template<typename OwnedSpan >
Common::SpanOwner< OwnedSpan >::SpanOwner ( const SpanOwner< OwnedSpan > &  other  )  [inline]

Creates a new owned copy of the memory from the other SpanOwner.

Definition at line 935 of file span.h.

template<typename OwnedSpan >
Common::SpanOwner< OwnedSpan >::~SpanOwner (  )  [inline]

Definition at line 965 of file span.h.


Member Function Documentation

template<typename OwnedSpan >
void Common::SpanOwner< OwnedSpan >::clear (  )  [inline]

Destroys the memory owned by this owner.

Definition at line 995 of file span.h.

template<typename OwnedSpan >
SpanOwner& Common::SpanOwner< OwnedSpan >::moveFrom ( SpanOwner< OwnedSpan > &  other  )  [inline]

Transfers ownership of the Span from the other owner to this owner.

Definition at line 972 of file span.h.

template<typename OwnedSpan >
const OwnedSpan& Common::SpanOwner< OwnedSpan >::operator* (  )  const [inline]

Definition at line 1014 of file span.h.

template<typename OwnedSpan >
OwnedSpan& Common::SpanOwner< OwnedSpan >::operator* (  )  [inline]

Definition at line 1015 of file span.h.

template<typename OwnedSpan >
const OwnedSpan* Common::SpanOwner< OwnedSpan >::operator-> (  )  const [inline]

Definition at line 1017 of file span.h.

template<typename OwnedSpan >
OwnedSpan* Common::SpanOwner< OwnedSpan >::operator-> (  )  [inline]

Definition at line 1018 of file span.h.

template<typename OwnedSpan >
SpanOwner& Common::SpanOwner< OwnedSpan >::operator= ( const SpanOwner< OwnedSpan > &  other  )  [inline]

Definition at line 947 of file span.h.

template<typename OwnedSpan >
const_reference Common::SpanOwner< OwnedSpan >::operator[] ( const index_type  index  )  const [inline]

Definition at line 1020 of file span.h.

template<typename OwnedSpan >
reference Common::SpanOwner< OwnedSpan >::operator[] ( const index_type  index  )  [inline]

Definition at line 1021 of file span.h.

template<typename OwnedSpan >
bool Common::SpanOwner< OwnedSpan >::operator_bool (  )  const [inline, protected]

Definition at line 1005 of file span.h.

template<typename OwnedSpan >
pointer Common::SpanOwner< OwnedSpan >::release (  )  [inline]

Releases the memory owned by this SpanOwner to the caller.

Definition at line 986 of file span.h.


Friends And Related Function Documentation

template<typename OwnedSpan >
friend struct SafeBool [friend]

Definition at line 924 of file span.h.


Member Data Documentation

template<typename OwnedSpan >
OwnedSpan Common::SpanOwner< OwnedSpan >::_span [private]

Definition at line 1008 of file span.h.


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


Generated on Sat Sep 19 2020 05:04:50 for ResidualVM by doxygen 1.7.1
curved edge   curved edge