| # Gaudi Framework, version v22r4 |

Home |  | Generated: Fri Sep 2 2011

Public Types | Public Member Functions | Public Attributes

# Gaudi::Parsers::Node Class Reference

`#include <Node.h>`

Collaboration diagram for Gaudi::Parsers::Node:
[legend]

List of all members.

## Public Types
enum | NodeType { kRoot, kInclude, kIdentifier, kProperty, kOperation, kValue, kAssign, kEqual, kPlusEqual, kMinusEqual, kVector, kMap, kPair, kSimple, kString, kReal, kBool, kUnits, kUnit, kCondition, kIfdef, kIfndef, kElse, kPrintOptions, kPrintOn, kPrintOff, kShell, kPrintTree, kDumpFile, kPropertyRef }
## Public Member Functions
| Node ()
std::string | name () const
std::string | ToString () const
std::string | ToString (int indent) const
## Public Attributes
NodeType | type
std::string | value
std::vector< Node > | children
Position | position

## Detailed Description

Definition at line 25 of file Node.h.

## Member Enumeration Documentation

enum Gaudi::Parsers::Node::NodeType

Enumerator:

  kRoot |
  kInclude |
  kIdentifier |
  kProperty |
  kOperation |
  kValue |
  kAssign |
  kEqual |
  kPlusEqual |
  kMinusEqual |
  kVector |
  kMap |
  kPair |
  kSimple |
  kString |
  kReal |
  kBool |
  kUnits |
  kUnit |
  kCondition |
  kIfdef |
  kIfndef |
  kElse |
  kPrintOptions |
  kPrintOn |
  kPrintOff |
  kShell |
  kPrintTree |
  kDumpFile |
  kPropertyRef |

Definition at line 27 of file Node.h.

                   {kRoot,kInclude, kIdentifier, kProperty, kOperation,
      kValue, kAssign, kEqual, kPlusEqual, kMinusEqual, kVector, kMap, kPair,
      kSimple, kString, kReal, kBool, kUnits, kUnit, kCondition, kIfdef, kIfndef,
      kElse, kPrintOptions, kPrintOn, kPrintOff, kShell, kPrintTree, kDumpFile,
      kPropertyRef};

## Constructor & Destructor Documentation

Gaudi::Parsers::Node::Node | ( | ) | `[inline]`

Definition at line 37 of file Node.h.

    : type(kRoot){}

## Member Function Documentation

std::string Gaudi::Parsers::Node::name | ( | ) | const

Definition at line 21 of file Node.cpp.

                                 {
        static bool init = false;
      if (!init) { // lazy init
          names[kRoot]        = "root";
          names[kInclude]     = "include";
          names[kIdentifier]  = "identifier";
          names[kProperty]    = "property";
          names[kOperation]   = "operation";
          names[kValue]       = "value";
          names[kAssign]      = "assign";
          names[kEqual]       = "equal";
          names[kPlusEqual]   = "plus_equal";
          names[kMinusEqual]  = "minus_equal";
          names[kVector]      = "vector";
          names[kMap]         = "map";
          names[kPair]        = "pair";
          names[kSimple]      = "simple";
          names[kString]      = "string";
          names[kReal]        = "real";
          names[kBool]        = "bool";
          names[kUnits]       = "units";
          names[kUnit]        = "unit";
          names[kCondition]   = "condition";
          names[kIfdef]       = "ifdef";
          names[kIfndef]      = "ifndef";
          names[kElse]        = "else";
          names[kPrintOptions] = "print_options";
          names[kPrintOn]     = "print_on";
          names[kPrintOff]    = "print_off";
          names[kShell]       = "shell";
          names[kPrintTree]   = "print_tree";
          names[kDumpFile]    = "dump_file";
          names[kPropertyRef] = "property_ref";
      }
      return names[type];
    }

std::string Gaudi::Parsers::Node::ToString | ( | int | indent ) | const

Definition at line 63 of file Node.cpp.

                                               {

        std::string result = "";
        tab(&result, indent);
        result += "<" + name();
        if (value != "")
            result += " value=\"" + value + "\"";
        if (position.line() != 0)
            result += " line=\"" + str(boost::format("%1%") % position.line())
              + "\"";
        if (position.column() != 0)
            result += " column=\"" + str(boost::format("%1%") % position.column())
              + "\"";

        if (children.size() == 0) {
            result += "/>\n";
        } else {
            result += ">\n";
            BOOST_FOREACH(Node const& node, children)
                        {
                            result += node.ToString(indent + 2);
                        }
            tab(&result, indent);
            result += str(boost::format("</%1%>\n") % name());
        }
        return result;
    }

std::string Gaudi::Parsers::Node::ToString | ( | ) | const

Definition at line 59 of file Node.cpp.

                                     {
        return ToString(0);
    }

## Member Data Documentation

std::vector<Node> Gaudi::Parsers::Node::children

Definition at line 34 of file Node.h.

Position Gaudi::Parsers::Node::position

Definition at line 35 of file Node.h.

NodeType Gaudi::Parsers::Node::type

Definition at line 32 of file Node.h.

std::string Gaudi::Parsers::Node::value

Definition at line 33 of file Node.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiSvc/src/JobOptionsSvc/Node.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r4/GaudiSvc/src/JobOptionsSvc/Node.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines