Subversion Repositories tpanel

Rev

Rev 446 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 446 Rev 480
Line 514... Line 514...
514
    }
514
    }
515
 
515
 
516
    return string();
516
    return string();
517
}
517
}
518
 
518
 
-
 
519
bool TExpat::getAttributeBool(const string& name, vector<ATTRIBUTE_t>& attrs)
-
 
520
{
-
 
521
    DECL_TRACER("TExpat::getAttributeBool(const string& name, vector<ATTRIBUTE_t>& attrs)");
-
 
522
 
-
 
523
    string b = getAttribute(name, attrs);
-
 
524
 
-
 
525
    if (b == "true" || b == "True" || b == "TRUE")
-
 
526
        return true;
-
 
527
 
-
 
528
    return false;
-
 
529
}
-
 
530
 
519
int TExpat::getAttributeInt(const string& name, vector<ATTRIBUTE_t>& attrs)
531
int TExpat::getAttributeInt(const string& name, vector<ATTRIBUTE_t>& attrs)
520
{
532
{
521
    DECL_TRACER("TExpat::getAttributeInt(const string& name, vector<ATTRIBUTE_t>& attrs)");
533
    DECL_TRACER("TExpat::getAttributeInt(const string& name, vector<ATTRIBUTE_t>& attrs)");
522
 
534
 
523
    return atoi(getAttribute(name, attrs).c_str());
535
    return atoi(getAttribute(name, attrs).c_str());
Line 542... Line 554...
542
    DECL_TRACER("TExpat::getAttributeDouble(const string& name, vector<ATTRIBUTE_t>& attrs)");
554
    DECL_TRACER("TExpat::getAttributeDouble(const string& name, vector<ATTRIBUTE_t>& attrs)");
543
 
555
 
544
    return atof(getAttribute(name, attrs).c_str());
556
    return atof(getAttribute(name, attrs).c_str());
545
}
557
}
546
 
558
 
-
 
559
bool TExpat::convertElementToBool(const string& content)
-
 
560
{
-
 
561
    DECL_TRACER("TExpat::convertElementToBool(const string& content)");
-
 
562
 
-
 
563
    if (content == "true" || content == "True" || content == "TRUE")
-
 
564
        return true;
-
 
565
 
-
 
566
    return false;
-
 
567
}
-
 
568
 
547
int TExpat::convertElementToInt(const string& content)
569
int TExpat::convertElementToInt(const string& content)
548
{
570
{
549
    DECL_TRACER("TExpat::convertElementToInt(const string& content)");
571
    DECL_TRACER("TExpat::convertElementToInt(const string& content)");
550
 
572
 
551
    if (content.empty())
573
    if (content.empty())