Back to index

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

#include <RSLParser.h>

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

List of all members.

Public Member Functions

 RSLCondition (const std::string &attr, RSLRelOp op, RSLList *values)
 ~RSLCondition ()
void Print (std::ostream &os=std::cout) const
const std::string & Attr () const
const RSLRelOp Op () const
std::list< RSLValue * >::iterator begin ()
std::list< RSLValue * >::iterator end ()
std::list< RSLValue * >
::const_iterator 
begin () const
std::list< RSLValue * >
::const_iterator 
end () const
std::list< RSLValue * >::size_type size () const
RSLEvaluate () const

Private Attributes

std::string attr
RSLRelOp op
RSLListvalues

Detailed Description

Definition at line 177 of file RSLParser.h.


Constructor & Destructor Documentation

Arc::RSLCondition::RSLCondition ( const std::string &  attr,
RSLRelOp  op,
RSLList values 
)

Definition at line 361 of file RSLParser.cpp.

    : RSL(),
      attr(attr),
      op(op),
      values(values) {
    // Normalize the attribute name
    // Does the same thing as globus_rsl_assist_attributes_canonicalize,
    // i.e. lowercase the attribute name and remove underscores
    this->attr = lower(this->attr);
    std::string::size_type pos = 0;
    while ((pos = this->attr.find('_', pos)) != std::string::npos)
      this->attr.erase(pos, 1);
  }

Here is the call graph for this function:

Definition at line 376 of file RSLParser.cpp.

                              {
    delete values;
  }

Member Function Documentation

const std::string& Arc::RSLCondition::Attr ( ) const [inline]

Definition at line 183 of file RSLParser.h.

                                  {
      return attr;
    }

Here is the caller graph for this function:

std::list<RSLValue*>::iterator Arc::RSLCondition::begin ( ) [inline]

Definition at line 189 of file RSLParser.h.

                                       {
      return values->begin();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

std::list<RSLValue*>::const_iterator Arc::RSLCondition::begin ( ) const [inline]

Definition at line 195 of file RSLParser.h.

                                                   {
      return values->begin();
    }

Here is the call graph for this function:

std::list<RSLValue*>::iterator Arc::RSLCondition::end ( ) [inline]

Definition at line 192 of file RSLParser.h.

                                     {
      return values->end();
    }

Here is the call graph for this function:

Here is the caller graph for this function:

std::list<RSLValue*>::const_iterator Arc::RSLCondition::end ( ) const [inline]

Definition at line 198 of file RSLParser.h.

                                                 {
      return values->end();
    }

Here is the call graph for this function:

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:

const RSLRelOp Arc::RSLCondition::Op ( ) const [inline]

Definition at line 186 of file RSLParser.h.

                              {
      return op;
    }

Here is the caller graph for this function:

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

Implements Arc::RSL.

Definition at line 380 of file RSLParser.cpp.

                                               {
    os << attr << ' ' << op << ' ' << *values;
  }
std::list<RSLValue*>::size_type Arc::RSLCondition::size ( ) const [inline]

Definition at line 201 of file RSLParser.h.

                                             {
      return values->size();
    }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

std::string Arc::RSLCondition::attr [private]

Definition at line 205 of file RSLParser.h.

Definition at line 206 of file RSLParser.h.

Definition at line 207 of file RSLParser.h.


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