libcamgm
Public Member Functions | Private Attributes | Friends | List of all members
ca_mgm::LiteralValue Class Reference

#include <LiteralValues.hpp>

Public Member Functions

 LiteralValue ()
 
 LiteralValue (const std::string &type, const std::string &value)
 
 LiteralValue (const std::string &value)
 
 LiteralValue (const LiteralValue &value)
 
LiteralValueoperator= (const LiteralValue &value)
 
virtual ~LiteralValue ()
 
void setLiteral (const std::string &type, const std::string &value)
 
void setValue (const std::string &value)
 
std::string getType () const
 
std::string getValue () const
 
virtual bool valid () const
 
virtual std::vector< std::string > verify () const
 
virtual std::vector< std::string > dump () const
 
std::string toString () const
 
std::string commit2Config (CA &ca, Type type, uint32_t num) const
 

Private Attributes

ca_mgm::RWCOW_pointer< LiteralValueImpl > m_impl
 

Friends

bool operator== (const LiteralValue &l, const LiteralValue &r)
 
bool operator< (const LiteralValue &l, const LiteralValue &r)
 

Detailed Description

A Literal Value is a pair of a type and a value Valid types are: URI, DNS, RID, IP, email, 1.3.6.1.4.1.311.20.2.3 (ms-upn) and 1.3.6.1.5.2.2 (KRB5PrincipalName)

Constructor & Destructor Documentation

ca_mgm::LiteralValue::LiteralValue ( )
ca_mgm::LiteralValue::LiteralValue ( const std::string &  type,
const std::string &  value 
)

Constructor

Parameters
typeValid types are: URI, DNS, RID, IP, email, 1.3.6.1.4.1.311.20.2.3 and 1.3.6.1.5.2.2
valuea value for the type
ca_mgm::LiteralValue::LiteralValue ( const std::string &  value)

Constructor

Parameters
valuein the form <type>:<value> Valid types are: URI, DNS, RID, IP, email, 1.3.6.1.4.1.311.20.2.3 and 1.3.6.1.5.2.2
ca_mgm::LiteralValue::LiteralValue ( const LiteralValue value)
virtual ca_mgm::LiteralValue::~LiteralValue ( )
virtual

Member Function Documentation

std::string ca_mgm::LiteralValue::commit2Config ( CA ca,
Type  type,
uint32_t  num 
) const

Return the string for the configuration. This method silently ignore unsupported types like othername.

virtual std::vector<std::string> ca_mgm::LiteralValue::dump ( ) const
virtual
std::string ca_mgm::LiteralValue::getType ( ) const

Return the type of this Literal Value

std::string ca_mgm::LiteralValue::getValue ( ) const

Return the value of this Literal Value

LiteralValue& ca_mgm::LiteralValue::operator= ( const LiteralValue value)
void ca_mgm::LiteralValue::setLiteral ( const std::string &  type,
const std::string &  value 
)

Set new values

Parameters
typeValid types are: URI, DNS, RID, IP, email, 1.3.6.1.4.1.311.20.2.3 and 1.3.6.1.5.2.2
valuea value for the type
void ca_mgm::LiteralValue::setValue ( const std::string &  value)

Set new values

Parameters
valuein the form <type>:<value> Valid types are: URI, DNS, RID, IP, email, 1.3.6.1.4.1.311.20.2.3 and 1.3.6.1.5.2.2
std::string ca_mgm::LiteralValue::toString ( ) const

Return the LiteralValue in the form <type>:<value>

virtual bool ca_mgm::LiteralValue::valid ( ) const
virtual
virtual std::vector<std::string> ca_mgm::LiteralValue::verify ( ) const
virtual

Friends And Related Function Documentation

bool operator< ( const LiteralValue l,
const LiteralValue r 
)
friend
bool operator== ( const LiteralValue l,
const LiteralValue r 
)
friend

Member Data Documentation

ca_mgm::RWCOW_pointer<LiteralValueImpl> ca_mgm::LiteralValue::m_impl
private

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