Go to the documentation of this file.
4 #ifndef tools_sg_sf_vec
5 #define tools_sg_sf_vec
14 template <
class T,
class TT>
19 static const std::string s_v(
"tools::sg::sf_vec<"+
stype(T())+
","+
stype(TT())+
">");
22 virtual void*
cast(
const std::string& a_class)
const {
44 mem::decrement(s_new().c_str());
50 for(
uint32 index=0;index<n;index++) vec[index] = v[index];
53 mem::decrement(s_new().c_str());
57 virtual bool dump(std::ostream& a_out) {
61 virtual bool s_value(std::string& a_s)
const {
64 for(
size_t index=0;index<vec.size();index++) {
66 std::ostringstream strm;
72 virtual bool s2value(
const std::string& a_s) {
73 std::vector<std::string> ws;
74 words(a_s,
" ",
false,ws);
76 if(ws.size()!=vec.size())
return false;
78 for(
size_t index=0;index<vec.size();index++) {
79 std::istringstream strm(ws[index].c_str());