Back to index

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

#include <DateTimeAttribute.h>

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

List of all members.

Public Member Functions

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

Static Public Member Functions

static const std::string & getIdentifier (void)

Private Attributes

Arc::Time value
std::string id

Static Private Attributes

static std::string identifier = "date"

Detailed Description

Definition at line 71 of file DateTimeAttribute.h.


Constructor & Destructor Documentation

Definition at line 78 of file DateTimeAttribute.h.

{ };
ArcSec::DateAttribute::DateAttribute ( const std::string &  v,
const std::string &  i 
)

Definition at line 120 of file DateTimeAttribute.cpp.

                                                                  {
  id=i;
  std::string v1 = v + "T00:00:00+00:00";
  DateTimeAttribute attr(v1,i);
  value = attr.getValue();
}

Here is the call graph for this function:

virtual ArcSec::DateAttribute::~DateAttribute ( ) [inline, virtual]

Definition at line 80 of file DateTimeAttribute.h.

{ };

Member Function Documentation

std::string ArcSec::DateAttribute::encode ( ) [virtual]

encode the value in a string format

Implements ArcSec::AttributeValue.

Definition at line 159 of file DateTimeAttribute.cpp.

                               {
  std::string v;
  v = value.str(Arc::ISOTime);
  return(v.substr(0,9));
}

Here is the call graph for this function:

bool ArcSec::DateAttribute::equal ( AttributeValue value,
bool  check_id = true 
) [virtual]

Evluate whether "this" equale to the parameter value.

Implements ArcSec::AttributeValue.

Definition at line 127 of file DateTimeAttribute.cpp.

                                                         {
  DateAttribute *other;
  try{
    other = dynamic_cast<DateAttribute*>(o);
  } catch(std::exception&) { };
  if(other==NULL){
    //std::cerr<<"not DateAttribute"<<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:

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

Get the AttributeId of the <Attribute>

Implements ArcSec::AttributeValue.

Definition at line 87 of file DateTimeAttribute.h.

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

Definition at line 88 of file DateTimeAttribute.h.

{ return identifier; };

Here is the caller graph for this function:

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

Get the DataType of the <Attribute>

Implements ArcSec::AttributeValue.

Definition at line 86 of file DateTimeAttribute.h.

{return identifier; };

Definition at line 85 of file DateTimeAttribute.h.

{ return value; };

Here is the caller graph for this function:

bool ArcSec::DateAttribute::lessthan ( AttributeValue other) [virtual]

Definition at line 143 of file DateTimeAttribute.cpp.

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

Here is the call graph for this function:


Member Data Documentation

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

Definition at line 75 of file DateTimeAttribute.h.

std::string ArcSec::DateAttribute::identifier = "date" [static, private]

Definition at line 73 of file DateTimeAttribute.h.

Definition at line 74 of file DateTimeAttribute.h.


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