Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes
ArcSec::BooleanAttribute Class Reference

#include <BooleanAttribute.h>

Inheritance diagram for ArcSec::BooleanAttribute:
Inheritance graph
[legend]
Collaboration diagram for ArcSec::BooleanAttribute:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BooleanAttribute ()
 BooleanAttribute (const bool &v, const std::string &i=std::string())
virtual ~BooleanAttribute ()
virtual bool equal (AttributeValue *o, bool check_id=true)
 Evluate whether "this" equale to the parameter value.
virtual std::string encode ()
 encode the value in a string format
bool getValue ()
std::string getId ()
 Get the AttributeId of the <Attribute>
std::string getType ()
 Get the DataType of the <Attribute>

Static Public Member Functions

static const std::string & getIdentifier (void)

Private Attributes

bool value
std::string id

Static Private Attributes

static std::string identifier = "bool"

Detailed Description

Definition at line 7 of file BooleanAttribute.h.


Constructor & Destructor Documentation

Definition at line 14 of file BooleanAttribute.h.

{ };
ArcSec::BooleanAttribute::BooleanAttribute ( const bool &  v,
const std::string &  i = std::string() 
) [inline]

Definition at line 15 of file BooleanAttribute.h.

: value(v), id(i){ };
virtual ArcSec::BooleanAttribute::~BooleanAttribute ( ) [inline, virtual]

Definition at line 16 of file BooleanAttribute.h.

{ };

Member Function Documentation

virtual std::string ArcSec::BooleanAttribute::encode ( ) [inline, virtual]

encode the value in a string format

Implements ArcSec::AttributeValue.

Definition at line 19 of file BooleanAttribute.h.

{ if(value) return std::string("true"); else return std::string("false"); };
bool ArcSec::BooleanAttribute::equal ( AttributeValue value,
bool  check_id = true 
) [virtual]

Evluate whether "this" equale to the parameter value.

Implements ArcSec::AttributeValue.

Definition at line 12 of file BooleanAttribute.cpp.

                                                            {
  BooleanAttribute *other;
  try{
    other = dynamic_cast<BooleanAttribute*>(o);
  } catch(std::exception&) { };
  if(other==NULL){
    //std::cerr<<"not BooleanAttribute"<<std::endl;
    return false;
  }
  if(check_id) { if(id != other->id) return false; }
  if(value==(other->getValue())) 
    return true;
  else 
    return false;
}

Here is the call graph for this function:

std::string ArcSec::BooleanAttribute::getId ( ) [inline, virtual]

Get the AttributeId of the <Attribute>

Implements ArcSec::AttributeValue.

Definition at line 21 of file BooleanAttribute.h.

{ return id; };
static const std::string& ArcSec::BooleanAttribute::getIdentifier ( void  ) [inline, static]

Definition at line 23 of file BooleanAttribute.h.

{ return identifier; };

Here is the caller graph for this function:

std::string ArcSec::BooleanAttribute::getType ( ) [inline, virtual]

Get the DataType of the <Attribute>

Implements ArcSec::AttributeValue.

Definition at line 22 of file BooleanAttribute.h.

{return identifier; };

Definition at line 20 of file BooleanAttribute.h.

{ return value; };

Here is the caller graph for this function:


Member Data Documentation

std::string ArcSec::BooleanAttribute::id [private]

Definition at line 11 of file BooleanAttribute.h.

std::string ArcSec::BooleanAttribute::identifier = "bool" [static, private]

Definition at line 9 of file BooleanAttribute.h.

Definition at line 10 of file BooleanAttribute.h.


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