24 #ifndef SHEAF_DLL_SPEC_H 25 #include "SheafSystem/sheaf_dll_spec.h" 29 #include "SheafSystem/block.h" 32 #ifndef AUTO_BLOCK_IMPL_H 33 #include "SheafSystem/auto_block.impl.h" 68 require(precondition_of(
auto_block(xub, xct, xitems)));
74 ensure(postcondition_of(
auto_block(xub, xct, xitems)));
104 require(precondition_of(auto_block::operator=(xother)));
108 base_type::operator=(xother);
112 ensure(postcondition_of(auto_block::operator=(xother)));
120 template <
typename T>
132 #ifndef DOXYGEN_1_5_4_SKIP_UNKNOWN 140 template <
typename T>
150 result = (xblk1.
ub() >= xblk2.
ub());
151 result = result && (xblk1.
ct() == xblk2.
ct());
155 result = (xblk1[i] == xblk2[i]);
166 template <
typename T>
168 operator << (std::ostream& xos, const block<T>& xblk)
170 for(
long int i=0; i<xblk.ct(); ++i)
172 xos <<
" " << xblk[i];
179 template <
typename T>
181 deep_size(
const block<T>& xblk,
bool xinclude_shallow)
189 result = xinclude_shallow ?
sizeof(xblk) : 0;
191 for(
int i=0; i<xblk.
ub(); ++i)
193 result += deep_size(xblk[i],
true);
203 #endif // DOXYGEN_1_5_4_SKIP_UNKNOWN 206 template <
typename T>
216 result = xinclude_shallow ?
sizeof(xblk) : 0;
218 result += xblk.
ub()*
sizeof(T*);
220 for(
int i=0; i<xblk.
ub(); ++i)
224 result += deep_size(*xblk[i],
true);
237 #endif // BLOCK_IMPL_H index_type ub() const
The upper bound on the storage array. The number of items current allocated in the storage array...
size_type ct() const
The number of items currently in use.
unsigned long int size_type
An unsigned integral type used to represent sizes and capacities.
A contiguously allocated array of items of type T with size information and automatic resizing...
block(index_type xub=0)
Creates an instance with ub() == xub; storage is uninitialized.
bool operator==(const singly_linked_list< T, Alloc > &lhs, const singly_linked_list< T, Alloc > &rhs)
Checks if the contents of lhs and rhs are equal, that is, whether lhs.size() == rhs.size() and each element in lhs compares equal with the element in rhs at the same position.
sheaf::pod_index_type index_type
The containers index type.
int_type pod_index_type
The plain old data index type.
Namespace for the sheaves component of the sheaf system.
An auto_block with a no-initialization initialization policy.