Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

glite::rgma::Properties Class Reference

#include <Properties.h>

Inheritance diagram for glite::rgma::Properties:

glite::rgma::SSLSigningPolicyProperties List of all members.

Public Member Functions

 Properties (std::string className="") throw (RGMAException)
virtual ~Properties ()
virtual void load (std::string filename) throw (RGMAException)
std::string getProperty (std::string key) throw (RGMAException)
std::string getProperty (std::string key, std::string defaultValue)
bool Properties::present (std::string key)

Protected Types

typedef std::map< std::string,
std::string > 
Table

Protected Member Functions

int getLine (char **line, int *length, FILE *inStream)

Protected Attributes

Table table

Detailed Description

R-GMA properties


Constructor & Destructor Documentation

glite::rgma::Properties::Properties std::string  className = ""  )  throw (RGMAException)
 

Constructor.

Parameters:
name optional parameter specifying the class name. Looks for the corresponding property file in $RGMA_HOME.

glite::rgma::Properties::~Properties  )  [virtual]
 

Destructor.


Member Function Documentation

int glite::rgma::Properties::getLine char **  line,
int *  length,
FILE *  inStream
[protected]
 

Mimics the GNU getline function. It reads an entire line, storing the address of the buffer containing the text into *line. The buffer is null-terminated and includes the newline character, if a newline delimiter was found.

Returns:
the number of characters read

std::string glite::rgma::Properties::getProperty std::string  key,
std::string  defaultValue
 

Gets a property with the specified key. This method returns the default value is the property is not found.

Parameters:
key the hashtable key
defaultValue default if property not present
Returns:
property value

std::string glite::rgma::Properties::getProperty std::string  key  )  throw (RGMAException)
 

Gets a property with the specified key. This method throws an exception if the property is not found.

Parameters:
key the hashtable key
Returns:
property value

void glite::rgma::Properties::load std::string  filename  )  throw (RGMAException) [virtual]
 

Loads properties from specified file. Run automatically by constructor if className is specified.

Reimplemented in glite::rgma::SSLSigningPolicyProperties.

bool glite::rgma::Properties::Properties::present std::string  key  ) 
 

Tests if the specified key is present in the table.

Parameters:
key the hashtable key
Returns:
true if present


The documentation for this class was generated from the following files:
Generated on Wed May 17 17:48:18 2006 for glite-rgma-api-cpp by doxygen 1.3.5