Definition at line 180 of file columns.
◆ finder() [1/2]
tools::columns::finder::finder |
( |
std::ostream & |
a_out, |
|
|
const std::string & |
a_script |
|
) |
| |
|
inline |
◆ ~finder()
virtual tools::columns::finder::~finder |
( |
| ) |
|
|
inlinevirtual |
◆ finder() [2/2]
tools::columns::finder::finder |
( |
const finder & |
a_from | ) |
|
|
inlineprotected |
Definition at line 191 of file columns.
191 :parent(a_from),
m_out(a_from.m_out){}
◆ analyse()
bool tools::columns::finder::analyse |
( |
columns::tree & |
a_tree, |
|
|
std::vector< value > & |
a_stack |
|
) |
| |
|
inlineprotected |
Definition at line 221 of file columns.
222 if(a_tree.m_dcl.empty()) {
225 if(!
analyse(*(*it),a_stack))
return false;
233 if(a_tree.m_sub.size()) {
235 m_out <<
"tools::columns::finder::analyse :"
236 <<
" Expect a VOID_STAR."
242 std::vector<value>* stk =
new std::vector<value>();
253 a_stack.push_back(*v);
◆ analyse_dcl()
value* tools::columns::finder::analyse_dcl |
( |
const std::string & |
a_s | ) |
|
|
inlineprotected |
Definition at line 258 of file columns.
259 std::vector<std::string> ws;
260 words(a_s,
"=",
false,ws);
262 std::vector<std::string> swords;
263 words(ws[0],
" ",
false,swords);
264 if(swords.size()==2) {
269 if(swords[0]==
"ITuple") {
272 value* v =
new value((
void*)0);
273 v->set_label(swords[1]);
279 if(!
s2type(swords[0],type)){
280 m_out <<
"tools::columns::finder::analyse_dcl :"
281 <<
" s2type failed for " << sout(swords[0]) <<
"."
289 m_out <<
"tools::columns::finder::analyse_dcl :"
290 <<
" syntax error in " << sout(a_s) <<
"."
291 <<
" new_value() failed."
295 v->set_label(swords[1]);
300 }
else if(swords.size()==1) {
302 m_out <<
"tools::columns::finder::analyse_dcl :"
303 <<
" (1) current type is NONE."
311 m_out <<
"tools::columns::finder::analyse_dcl :"
312 <<
" syntax error in " << sout(a_s) <<
"."
313 <<
" Bad value " << sout(ws[1]) <<
"."
317 v->set_label(swords[0]);
321 m_out <<
"tools::columns::finder::analyse_dcl :"
322 <<
" syntax error in " << sout(a_s)
328 }
else if(ws.size()==1) {
331 std::vector<std::string> swords;
332 words(ws[0],
" ",
false,swords);
333 if(swords.size()==2) {
337 if(swords[0]==
"ITuple") {
340 value* v =
new value((
void*)0);
341 v->set_label(swords[1]);
346 if(!
s2type(swords[0],type)){
347 m_out <<
"tools::columns::finder::analyse_dcl :"
348 <<
" s2type failed for " << sout(swords[0]) <<
"."
355 m_out <<
"tools::columns::finder::analyse_dcl :"
356 <<
" (2) syntax error in " << sout(ws[0]) <<
"."
357 <<
" Unknown type " << sout(swords[0]) <<
"."
361 v->set_label(swords[1]);
365 }
else if(swords.size()==1) {
368 m_out <<
"tools::columns::finder::analyse_dcl :"
369 <<
" (1) current type is NONE."
374 value* v =
new value();
376 v->set_label(swords[0]);
380 m_out <<
"tools::columns::finder::analyse_dcl :"
381 <<
" syntax error in " << sout(a_s)
388 m_out <<
"tools::columns::finder::analyse_dcl :"
389 <<
" syntax error in " << sout(a_s)
◆ clear()
void tools::columns::finder::clear |
( |
| ) |
|
|
inline |
◆ find_variables()
bool tools::columns::finder::find_variables |
( |
| ) |
|
|
inline |
◆ new_value()
static value* tools::columns::finder::new_value |
( |
value::e_type |
a_type, |
|
|
const std::string & |
a_v |
|
) |
| |
|
inlinestaticprotected |
Definition at line 449 of file columns.
452 if(a_v.size()) {
if(!to<float>(a_v,v))
return 0;}
456 if(a_v.size()) {
if(!to<double>(a_v,v))
return 0;}
464 if(a_v.size()) {
if(!to<short>(a_v,v))
return 0;}
468 if(a_v.size()) {
if(!to<int>(a_v,v))
return 0;}
473 if(a_v.size()) {
if(!to<int64>(a_v,v))
return 0;}
477 if(a_v.size()) {
if(!
to(a_v,v))
return 0;}
481 if( (a_v.size()>=2) && (a_v[0]==
'"') && (a_v[a_v.size()-1]==
'"') ){
482 return new value(a_v.substr(1,a_v.size()-2));
484 return new value(a_v);
493 unsigned short v = 0;
494 if(a_v.size()) {
if(!to<unsigned short>(a_v,v))
return 0;}
498 if(a_v.size()) {
if(!to<unsigned int>(a_v,v))
return 0;}
503 if(a_v.size()) {
if(!to<uint64>(a_v,v))
return 0;}
507 if(a_v.size())
return 0;
508 value* v =
new value();
512 if(a_v.size())
return 0;
513 value* v =
new value();
527 if(a_v.size())
return 0;
528 value* v =
new value();
532 if(a_v.size())
return 0;
533 value* v =
new value();
537 if(a_v.size())
return 0;
538 value* v =
new value();
542 if(a_v.size())
return 0;
543 value* v =
new value();
547 if(a_v.size())
return 0;
548 value* v =
new value();
◆ operator=()
finder& tools::columns::finder::operator= |
( |
const finder & |
| ) |
|
|
inlineprotected |
◆ result()
void tools::columns::finder::result |
( |
std::vector< value > & |
a_vars | ) |
const |
|
inline |
◆ s2type()
static bool tools::columns::finder::s2type |
( |
const std::string & |
a_s, |
|
|
value::e_type & |
a_type |
|
) |
| |
|
inlinestaticprotected |
Definition at line 396 of file columns.
399 }
else if(a_s==
"double") {
403 }
else if(a_s==
"short") {
405 }
else if(a_s==
"int") {
407 }
else if(a_s==
"long") {
409 }
else if((a_s==
"bool")||(a_s==
"boolean")) {
411 }
else if((a_s==
"string")||(a_s==
"java.lang.String")){
416 }
else if(a_s==
"float[]") {
418 }
else if(a_s==
"double[]") {
424 }
else if(a_s==
"short[]") {
426 }
else if(a_s==
"int[]") {
428 }
else if(a_s==
"long[]") {
430 }
else if((a_s==
"bool[]")||(a_s==
"boolean[]")) {
432 }
else if((a_s==
"string[]")||(a_s==
"java.lang.String[]")){
438 }
else if(a_s==
"ushort") {
440 }
else if(a_s==
"uint") {
442 }
else if(a_s==
"ulong") {
◆ m_cur_type
◆ m_out
std::ostream& tools::columns::finder::m_out |
◆ m_script
std::string tools::columns::finder::m_script |
◆ m_stack
std::vector<value> tools::columns::finder::m_stack |
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/g4tools/g4tools/tools/columns