Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Attributes
Arc::RSLBoolean Class Reference

#include <RSLParser.h>

Inheritance diagram for Arc::RSLBoolean:
Inheritance graph
[legend]
Collaboration diagram for Arc::RSLBoolean:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RSLBoolean (RSLBoolOp op)
 ~RSLBoolean ()
void Add (RSL *condition)
void Print (std::ostream &os=std::cout) const
RSLBoolOp Op () const
std::list< RSL * >::iterator begin ()
std::list< RSL * >::iterator end ()
std::list< RSL * >::const_iterator begin () const
std::list< RSL * >::const_iterator end () const
std::list< RSL * >::size_type size () const
RSLEvaluate () const

Private Attributes

RSLBoolOp op
std::list< RSL * > conditions

Detailed Description

Definition at line 147 of file RSLParser.h.


Constructor & Destructor Documentation

Definition at line 342 of file RSLParser.cpp.

    : RSL(),
      op(op) {}

Definition at line 346 of file RSLParser.cpp.

                          {
    for (std::list<RSL*>::iterator it = begin(); it != end(); it++)
      delete *it;
  }

Here is the call graph for this function:


Member Function Documentation

void Arc::RSLBoolean::Add ( RSL condition)

Definition at line 351 of file RSLParser.cpp.

                                     {
    conditions.push_back(condition);
  }

Here is the caller graph for this function:

std::list<RSL*>::iterator Arc::RSLBoolean::begin ( ) [inline]

Definition at line 157 of file RSLParser.h.

                                  {
      return conditions.begin();
    }

Here is the caller graph for this function:

std::list<RSL*>::const_iterator Arc::RSLBoolean::begin ( ) const [inline]

Definition at line 163 of file RSLParser.h.

                                              {
      return conditions.begin();
    }
std::list<RSL*>::iterator Arc::RSLBoolean::end ( ) [inline]

Definition at line 160 of file RSLParser.h.

                                {
      return conditions.end();
    }

Here is the caller graph for this function:

std::list<RSL*>::const_iterator Arc::RSLBoolean::end ( ) const [inline]

Definition at line 166 of file RSLParser.h.

                                            {
      return conditions.end();
    }
RSL * Arc::RSL::Evaluate ( ) const [inherited]

Definition at line 191 of file RSLParser.cpp.

                           {
    const RSLBoolean *b = dynamic_cast<const RSLBoolean*>(this);
    if (b && (b->Op() == RSLMulti)) {
      RSLBoolean *result = new RSLBoolean(RSLMulti);
      for (std::list<RSL*>::const_iterator it = b->begin();
           it != b->end(); it++) {
        RSL *rsl = (*it)->Evaluate();
        if (!rsl) {
          std::stringstream ss;
          ss << **it;
          logger.msg(ERROR, "RLS (inside multi) could not be evaluated: %s",
                     ss.str());
          delete rsl;
          return NULL;
        }
        result->Add(rsl);
      }
      return result;
    }
    else {
      std::map<std::string, std::string> vars;
      RSL *result = Evaluate(vars);
      if (!result) {
        std::stringstream ss;
        ss << *this;
        logger.msg(ERROR, "RLS could not be evaluated: %s", ss.str());
        return NULL;
      }
      return result;
    }
  }

Here is the call graph for this function:

Here is the caller graph for this function:

RSLBoolOp Arc::RSLBoolean::Op ( ) const [inline]

Definition at line 154 of file RSLParser.h.

                         {
      return op;
    }

Here is the caller graph for this function:

void Arc::RSLBoolean::Print ( std::ostream &  os = std::cout) const [virtual]

Implements Arc::RSL.

Definition at line 355 of file RSLParser.cpp.

                                             {
    os << op;
    for (std::list<RSL*>::const_iterator it = begin(); it != end(); it++)
      os << "( " << **it << " )";
  }

Here is the call graph for this function:

std::list<RSL*>::size_type Arc::RSLBoolean::size ( ) const [inline]

Definition at line 169 of file RSLParser.h.

                                        {
      return conditions.size();
    }

Here is the caller graph for this function:


Member Data Documentation

std::list<RSL*> Arc::RSLBoolean::conditions [private]

Definition at line 174 of file RSLParser.h.

Definition at line 173 of file RSLParser.h.


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