Back to index

nordugrid-arc-nox  1.1.0~rc6
BooleanAttribute.h
Go to the documentation of this file.
00001 #ifndef __ARC_SEC_BOOLEANATTRIBUTE_H__
00002 #define __ARC_SEC_BOOlEANATTRIBUTE_H__
00003 
00004 #include <arc/security/ArcPDP/attr/AttributeValue.h>
00005 
00006 namespace ArcSec {
00007 class BooleanAttribute : public AttributeValue {
00008 private:
00009   static std::string identifier;
00010   bool value;
00011   std::string id;
00012   
00013 public:
00014   BooleanAttribute() { };
00015   BooleanAttribute(const bool& v,const std::string& i = std::string()) : value(v), id(i){ };
00016   virtual ~BooleanAttribute(){ };
00017 
00018   virtual bool equal(AttributeValue* o, bool check_id = true);
00019   virtual std::string encode() { if(value) return std::string("true"); else return std::string("false"); };
00020   bool getValue(){ return value; };
00021   std::string getId(){ return id; };
00022   std::string getType() {return identifier; };
00023   static const std::string& getIdentifier(void) { return identifier; };
00024  
00025 };
00026 
00027 }// namespace ArcSec
00028 
00029 #endif /* __ARC_SEC_BOOLEANATTRIBUTE_H__ */
00030 
00031