Back to index

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

Format: YYYYMMDDHHMMSSZ Day Month DD HH:MM:SS YYYY YYYY-MM-DD HH:MM:SS YYYY-MM-DDTHH:MM:SS+HH:MM YYYY-MM-DDTHH:MM:SSZ. More...

#include <DateTimeAttribute.h>

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

List of all members.

Public Member Functions

 DateTimeAttribute ()
 DateTimeAttribute (const std::string &v, const std::string &i)
virtual ~DateTimeAttribute ()
virtual bool equal (AttributeValue *other, bool check_id=true)
 Evluate whether "this" equale to the parameter value.
virtual bool lessthan (AttributeValue *other)
virtual bool inrange (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 = "datetime"

Detailed Description

Format: YYYYMMDDHHMMSSZ Day Month DD HH:MM:SS YYYY YYYY-MM-DD HH:MM:SS YYYY-MM-DDTHH:MM:SS+HH:MM YYYY-MM-DDTHH:MM:SSZ.

Definition at line 20 of file DateTimeAttribute.h.


Constructor & Destructor Documentation

Definition at line 27 of file DateTimeAttribute.h.

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

Definition at line 28 of file DateTimeAttribute.h.

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

Definition at line 29 of file DateTimeAttribute.h.

{ };

Member Function Documentation

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

encode the value in a string format

Implements ArcSec::AttributeValue.

Definition at line 68 of file DateTimeAttribute.cpp.

                                   {
  return(value.str(Arc::ISOTime));
}

Here is the call graph for this function:

bool ArcSec::DateTimeAttribute::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 DateTimeAttribute.cpp.

                                                             {
  DateTimeAttribute *other;
  try{
    other = dynamic_cast<DateTimeAttribute*>(o);
  } catch(std::exception&) { };
  if(other==NULL){
    //std::cerr<<"not DateTimeAttribute"<<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::DateTimeAttribute::getId ( ) [inline, virtual]

Get the AttributeId of the <Attribute>

Implements ArcSec::AttributeValue.

Definition at line 37 of file DateTimeAttribute.h.

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

Definition at line 38 of file DateTimeAttribute.h.

{ return identifier; };

Here is the caller graph for this function:

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

Get the DataType of the <Attribute>

Implements ArcSec::AttributeValue.

Definition at line 36 of file DateTimeAttribute.h.

{return identifier; };

Definition at line 35 of file DateTimeAttribute.h.

{ return value; };

Here is the caller graph for this function:

Definition at line 43 of file DateTimeAttribute.cpp.

                                                {
  PeriodAttribute *other;
  try{
    other = dynamic_cast<PeriodAttribute*>(o);
  } catch(std::exception&) { };
  if(other==NULL){
    //std::cerr<<"not PeriodAttribute"<<std::endl;
    return false;
  } 
  ArcPeriod period = other->getValue(); 

  Arc::Time st, et;
  st = period.starttime;
  et = period.endtime;
  if(period.starttime == Arc::Time(-1))
    st = period.endtime - period.duration;
  else if(period.endtime == Arc::Time(-1))
    et = period.starttime + period.duration;

  if((value>=st)&&(value<=et))
    return true;
  else
    return false;  
} 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 28 of file DateTimeAttribute.cpp.

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

Definition at line 24 of file DateTimeAttribute.h.

std::string ArcSec::DateTimeAttribute::identifier = "datetime" [static, private]

Definition at line 22 of file DateTimeAttribute.h.

Definition at line 23 of file DateTimeAttribute.h.


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