Revision 64b4f0d5 src/template/Template.cc

View differences:

src/template/Template.cc
473 473
/* -------------------------------------------------------------------------- */
474 474
/* -------------------------------------------------------------------------- */
475 475

  
476
bool Template::get(
477
        const string&   name,
478
        bool&           value) const
479
{
480
    string sval;
481

  
482
    get(name, sval);
483

  
484
    if ( sval == "" )
485
    {
486
        value = false;
487
        return false;
488
    }
489

  
490
    if ( sval == "1" || sval == "true" || sval == "YES" ) {
491
        value = true;
492
    }
493
    else
494
    {
495
        value = false;
496
    }
497

  
498
    return true;
499
}
500

  
501
/* -------------------------------------------------------------------------- */
502
/* -------------------------------------------------------------------------- */
503

  
476 504
string& Template::to_xml(string& xml) const
477 505
{
478 506
    multimap<string,Attribute *>::const_iterator  it;

Also available in: Unified diff