Go to the documentation of this file.
4 #ifndef tools_sg_field_desc
5 #define tools_sg_field_desc
35 const std::string& a_class,
76 typedef std::pair<std::string,int>
enum_t;
80 const std::vector<std::string>&
opts()
const {
return m_opts;}
103 :
parent(a_name,a_class,a_offset,a_editable)
106 va_start(
args,a_num);
107 for(
size_t index=0;index<a_num;index++) {
108 char* _key = va_arg(
args,
char*);
109 int _value = va_arg(
args,
int);
124 :
parent(a_name,a_class,a_offset,a_editable)
127 va_start(
args,a_num);
128 for(
size_t index=0;index<a_num;index++) {
129 char* _value = va_arg(
args,
char*);
149 typedef std::vector<field_desc> parent;
153 parent::operator=(a_parent);
155 va_start(
args,a_num);
156 for(
size_t index=0;index<a_num;index++) {
158 parent::push_back(*_fd);
168 void dump(std::ostream& a_out)
const {
169 a_out <<
"num fields " <<
parent::size() <<
" :" << std::endl;
172 a_out <<
"name " << _fd.
name() << std::endl;
173 a_out <<
"class " << _fd.
cls() << std::endl;
174 a_out <<
"offset " << _fd.
offset() << std::endl;
175 a_out <<
"editable " << (_fd.
editable()?
"yes":
"no") << std::endl;
176 {
const std::vector<field_desc::enum_t>& _enums = _fd.
enums();
178 a_out <<
"num enums " << _enums.size() <<
" :" << std::endl;
180 a_out <<
"key " << (*eit).first <<
", value " << (*eit).second << std::endl;
183 {
const std::vector<std::string>& _opts = _fd.
opts();
185 a_out <<
"num options " << _opts.size() <<
" :" << std::endl;
187 a_out <<
" " << (*oit) << std::endl;
#define tools_vforcit(a__T, a__v, a__it)