Go to the documentation of this file.
13 #include "../io/iwbuf"
14 #include "../io/irbuf"
25 static const std::string s_v(
"tools::sg::mf<"+
stype(T())+
">");
28 virtual void*
cast(
const std::string& a_class)
const {
42 virtual bool dump(std::ostream& a_out) {
44 a_out <<
"size : " << vec.size() << std::endl;
45 typedef typename std::vector<T>::const_iterator cit_t;
46 for(cit_t it=vec.begin();it!=vec.end();++it) {
47 a_out <<
" " << (*it) << std::endl;
51 virtual bool s_value(std::string& a_s)
const {a_s.clear();
return false;}
52 virtual bool s2value(
const std::string&) {
return false;}
83 std::vector<std::string>& vec = parent::m_values;
86 virtual bool dump(std::ostream& a_out) {
87 const std::vector<std::string>& vec = parent::m_values;
88 a_out <<
"size : " << vec.size() << std::endl;
89 std::vector<std::string>::const_iterator it;
90 for(it=vec.begin();it!=vec.end();++it) {
91 a_out <<
" \"" << (*it) <<
"\"" << std::endl;
95 virtual bool s_value(std::string& a_s)
const {a_s.clear();
return false;}
96 virtual bool s2value(
const std::string&) {
return false;}
126 static const std::string s_v(
"tools::sg::mf_enum");
129 virtual void*
cast(
const std::string& a_class)
const {
137 std::vector<int16> v;
138 typedef typename std::vector<T>::const_iterator cit_t;
139 for(cit_t it=vec.begin();it!=vec.end();++it) v.push_back(*it);
143 std::vector<int16> v;
147 std::vector<int16>::const_iterator it;
148 for(it=v.begin();it!=v.end();++it) vec.push_back((T)(*it));
151 virtual bool dump(std::ostream& a_out) {
153 a_out <<
"size : " << vec.size() << std::endl;
154 typedef typename std::vector<T>::const_iterator cit_t;
155 for(cit_t it=vec.begin();it!=vec.end();++it) {
156 a_out <<
" " << (*it) << std::endl;
160 virtual bool s_value(std::string& a_s)
const {a_s.clear();
return false;}
161 virtual bool s2value(
const std::string&) {
return false;}
181 inline std::ostream&
operator<<(std::ostream& a_out,
const std::vector<std::string>&) {
186 inline bool set_from_vec(std::vector<std::string>&,
const std::vector<std::string>&) {
191 inline const std::string*
get_data(
const std::vector<std::string>& a_v) {
199 template <
class T,
class TT>
204 static const std::string s_v(
"tools::sg::mf_vec<"+
stype(T())+
","+
stype(TT())+
">");
207 virtual void*
cast(
const std::string& a_class)
const {
215 typedef typename std::vector<TT> vec_t;
216 std::vector<vec_t> vec_vec;
217 typedef typename std::vector<T>::const_iterator cit_t;
218 for(cit_t it=vec.begin();it!=vec.end();++it) {
221 size_t num = v.size();
224 std::vector<TT> std_vec(num);
225 for(
size_t i=0;i<num;i++) std_vec[i] = d[i];
227 vec_vec.push_back(std_vec);
234 typedef typename std::vector<TT> vec_t;
235 std::vector<vec_t> vec_vec;
237 typedef typename std::vector<vec_t>::iterator _it_t;
238 for(_it_t it=vec_vec.begin();it!=vec_vec.end();++it) {
247 virtual bool dump(std::ostream& a_out) {
249 a_out <<
"size : " << vec.size() << std::endl;
250 typedef typename std::vector<T>::const_iterator cit_t;
251 for(cit_t it=vec.begin();it!=vec.end();++it) {
252 a_out <<
" " << (*it) << std::endl;
256 virtual bool s_value(std::string& a_s)
const {a_s.clear();
return false;}
257 virtual bool s2value(
const std::string&) {
return false;}
276 static const std::string s_v(
"tools::sg::mf_std_vec<"+
stype(T())+
">");
279 virtual void*
cast(
const std::string& a_class)
const {
294 virtual bool dump(std::ostream& a_out) {
296 a_out <<
"size : " << vec.size() << std::endl;
297 typedef typename std::vector< std::vector<T> >::const_iterator cit_t;
298 for(cit_t it=vec.begin();it!=vec.end();++it) {
303 virtual bool s_value(std::string& a_s)
const {a_s.clear();
return false;}
304 virtual bool s2value(
const std::string&) {
return false;}
#define TOOLS_HEADER(a__class, a__sclass, a__parent)