SheafSystem
0.0.0.0
|
Whitespace-separated-value block; A block of objects of type T that can be conveniently initialized by a whitespace-separated list. More...
#include <wsv_block.h>
Public Member Functions | |
wsv_block () | |
Default constructor. More... | |
wsv_block (const wsv_block &xother) | |
Copy constructor. More... | |
~wsv_block () | |
Destructor. More... | |
wsv_block (const char *xlist) | |
Creates an instance initialized from whitespace-separated list xlist. More... | |
wsv_block (const std::string &xlist) | |
Creates an instance initialized from whitespace-separated list xlist. More... | |
wsv_block & | operator= (const wsv_block &xother) |
Sets the contents of this to the contents of whitespace-separated list xlist. More... | |
wsv_block & | operator= (const std::string &xlist) |
Sets the contents of this to the contents of whitespace-separated list xlist. More... | |
wsv_block & | operator= (const char *xlist) |
Sets the contents of this to the contents of whitespace-separated list xlist. More... | |
bool | invariant () const |
The class invariant. More... | |
void | push_back (const wsv_block &xother) |
Appends xother to the back of this. More... | |
template<> | |
SHEAF_DLL_SPEC wsv_block< bool > & | operator= (const std::string &xlist) |
Public Member Functions inherited from sheaf::block< T > | |
block (index_type xub=0) | |
Creates an instance with ub() == xub; storage is uninitialized. More... | |
block (index_type xub, size_type xct, const T *xitems) | |
Creates an instance with ub() == xub; storage is initialized with xct items copied from xitems. More... | |
block (const block &xother) | |
Copy constructor. More... | |
block & | operator= (const block &xother) |
Assignment operator. More... | |
~block () | |
Destructor. More... | |
Public Member Functions inherited from sheaf::auto_block< T, un_block_initialization_policy< T > > | |
pointer_type | base () const |
The underlying storage array. More... | |
size_type | ct () const |
The number of items currently in use. More... | |
bool | invariant () const |
The class invariant. More... | |
reference_type | item (index_type xindex) const |
The item at index xindex. More... | |
reference_type | operator[] (index_type xindex) const |
The item at index xindex. More... | |
index_type | ub () const |
The upper bound on the storage array. The number of items current allocated in the storage array. More... | |
auto_block (index_type xub=0) | |
Creates an instance with ub() == xub; storage is uninitialized. More... | |
auto_block (index_type xub, size_type xct, const T *xitems) | |
Creates an instance with ub() == xub; storage is initialized with xct items copied from xitems. More... | |
auto_block (const auto_block &xother) | |
Copy constructor. More... | |
auto_block & | operator= (const auto_block &xother) |
Assignment operator. More... | |
virtual | ~auto_block () |
Destructor. More... | |
void | force_item (index_type xindex, const_reference_type xitem) |
Puts the item xitem at index xindex, resizing if necessary; any other new storage allocated is uninitialized. More... | |
void | reserve (index_type xub) |
Makes ub() at least xub; if new storage is allocated, it is uninitialized. More... | |
void | set_ct (size_type xct) |
Sets ct() == xct. More... | |
void | set_item (index_type xindex, const_reference_type xitem) |
Puts the item xitem at index xindex, but will not resize. More... | |
void | assign (const_reference_type xitem) |
Sets the values of all items to xitem. More... | |
void | assign (index_type xbegin, index_type xend, const_reference_type xitem) |
Sets the values of items with xbegin <= index < xend to xitem. More... | |
reference_type | back () const |
The last item in the auto_block. More... | |
void | push_back (const_reference_type item) |
Insert item at the end of the items in the auto_block. More... | |
void | push_back (const auto_block &xother) |
Appends xother to the back of this. More... | |
void | pop_back () |
Remove item at the back. More... | |
void | clear () |
Remove all items. More... | |
void | initialize (index_type xindex) |
Invokes the initialization policy on the item at xindex. More... | |
void | initialize (index_type xbegin, index_type xend) |
Invokes the initialization policy on the range [xbegin, xend). More... | |
Additional Inherited Members | |
Public Types inherited from sheaf::block< T > | |
typedef auto_block< T, un_block_initialization_policy< T > > | base_type |
typedef base_type::index_type | index_type |
typedef base_type::size_type | size_type |
Public Types inherited from sheaf::auto_block< T, un_block_initialization_policy< T > > | |
typedef T | value_type |
The type of value stored in the container. More... | |
typedef un_block_initialization_policy< T > | initialization_policy |
The value initialization policy. More... | |
typedef T & | reference_type |
A type that behaves as a reference to the container's value type. More... | |
typedef const T & | const_reference_type |
A type that behaves as a const reference to the container's value type. More... | |
typedef T * | pointer_type |
A type that behaves as a pointer to the container's value type. More... | |
typedef const T * | const_pointer_type |
A type that behaves as a const pointer to the container's value type. More... | |
typedef sheaf::pod_index_type | index_type |
The containers index type. More... | |
typedef signed long int | difference_type |
A signed integral type used to represent the difference of two indices or iterators. More... | |
typedef unsigned long int | size_type |
An unsigned integral type used to represent sizes and capacities. More... | |
Protected Attributes inherited from sheaf::auto_block< T, un_block_initialization_policy< T > > | |
pointer_type | _base |
Start of storage for this. More... | |
index_type | _ub |
The index upper bound. More... | |
size_type | _ct |
The number of items currently stored. More... | |
Whitespace-separated-value block; A block of objects of type T that can be conveniently initialized by a whitespace-separated list.
sheaf::wsv_block< T >::wsv_block | ( | ) |
Default constructor.
Definition at line 52 of file wsv_block.impl.h.
Referenced by sheaf::wsv_block< int >::wsv_block().
sheaf::wsv_block< T >::wsv_block | ( | const wsv_block< T > & | xother | ) |
Copy constructor.
Definition at line 74 of file wsv_block.impl.h.
sheaf::wsv_block< T >::~wsv_block | ( | ) |
Destructor.
Definition at line 97 of file wsv_block.impl.h.
sheaf::wsv_block< T >::wsv_block | ( | const char * | xlist | ) |
Creates an instance initialized from whitespace-separated list xlist.
Definition at line 103 of file wsv_block.impl.h.
sheaf::wsv_block< T >::wsv_block | ( | const std::string & | xlist | ) |
Creates an instance initialized from whitespace-separated list xlist.
Definition at line 123 of file wsv_block.impl.h.
bool sheaf::wsv_block< T >::invariant | ( | ) | const |
The class invariant.
Definition at line 213 of file wsv_block.impl.h.
wsv_block< T > & sheaf::wsv_block< T >::operator= | ( | const wsv_block< T > & | xother | ) |
Sets the contents of this to the contents of whitespace-separated list xlist.
Definition at line 144 of file wsv_block.impl.h.
wsv_block< T > & sheaf::wsv_block< T >::operator= | ( | const std::string & | xlist | ) |
Sets the contents of this to the contents of whitespace-separated list xlist.
Definition at line 164 of file wsv_block.impl.h.
wsv_block< T > & sheaf::wsv_block< T >::operator= | ( | const char * | xlist | ) |
Sets the contents of this to the contents of whitespace-separated list xlist.
Definition at line 192 of file wsv_block.impl.h.
void sheaf::wsv_block< T >::push_back | ( | const wsv_block< T > & | xother | ) |
Appends xother to the back of this.
Definition at line 231 of file wsv_block.impl.h.