libyui
Public Member Functions

YEnvVar Class Reference

#include <YEnvVar.h>

List of all members.

Public Member Functions

 YEnvVar (const string &name=string())
string name () const
bool isSet () const
string value () const
bool isEqual (const string &str, bool caseSensitive=false) const
bool operator== (const string &str) const
bool contains (const string &str, bool caseSensitive=false) const

Detailed Description

Helper class to represent an environment variable and its value.


Constructor & Destructor Documentation

YEnvVar::YEnvVar ( const string &  name = string())

Constructor: Retrieve the environment variable 'name' and store the value (unless 'name' is empty).


Member Function Documentation

bool YEnvVar::contains ( const string &  str,
bool  caseSensitive = false 
) const

Return 'true' if the environment variable is set and the value contains 'str'.

bool YEnvVar::isEqual ( const string &  str,
bool  caseSensitive = false 
) const

Return 'true' if the environment variable is set and the value is 'str'.

bool YEnvVar::isSet ( ) const [inline]

Return 'true' if the environment variable is set.

string YEnvVar::name ( ) const [inline]

Return the name of the environment variable.

bool YEnvVar::operator== ( const string &  str) const [inline]

Case-insensitive comparison (shortcut for isEqual() ): Return 'true' if the environment variable is set and the value is 'str'.

string YEnvVar::value ( ) const [inline]

Return the value of the environment variable.


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Friends