20 #ifndef WSV_BLOCK_IMPL_H 21 #define WSV_BLOCK_IMPL_H 23 #ifndef SHEAF_DLL_SPEC_H 24 #include "SheafSystem/sheaf_dll_spec.h" 28 #include "SheafSystem/wsv_block.h" 31 #ifndef ASSERT_CONTRACT_H 32 #include "SheafSystem/assert_contract.h" 36 #include "SheafSystem/block_impl.h" 40 #include "SheafSystem/std_cstring.h" 44 #include "SheafSystem/std_sstream.h" 65 ensure(this->ub() == 0);
79 require(precondition_of(block_xother));
87 ensure(postcondition_of(
block(xother)));
101 template <
typename T>
114 ensure(strlen(xlist) > 0 ? this->ct() > 0 :
true);
121 template <
typename T>
134 ensure(!xlist.empty() ? this->ct() > 0 :
true);
141 template <
typename T>
161 template <
typename T>
170 std::stringstream lval_stream;
171 lval_stream.str(xlist);
174 while(lval_stream >> lval)
182 ensure(!xlist.empty() ? this->ct() > 0 :
true);
189 template <
typename T>
199 this->operator=(std::string(xlist));
203 ensure(strlen(xlist) > 0 ? this->ct() > 0 :
true);
210 template <
typename T>
228 template <
typename T>
237 define_old_variable(
int old_ct = this->ct());
240 for(
int i=0; i<xother.
ct(); ++i)
242 push_back(xother[i]);
247 ensure(this->ct() == old_ct + xother.
ct());
248 ensure_for_all(i, 0, xother.
ct(), ((*this)[i + old_ct] == xother[i]) );
263 #endif // ifndef WSV_BLOCK_IMPL_H size_type ct() const
The number of items currently in use.
wsv_block()
Default constructor.
Namespace for the sheaves component of the sheaf system.
An auto_block with a no-initialization initialization policy.
Whitespace-separated-value block; A block of objects of type T that can be conveniently initialized b...