Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > by-pkgid > ad1ba1135a9c9eeffc2e538163e00373 > files > 693

libCommonC++2_1.4-devel-1.4.1-1mdv2007.0.i586.rpm

\section{ost::Keydata Class Reference}
\label{classost_1_1_keydata}\index{ost::Keydata@{ost::Keydata}}
{\bf Keydata}{\rm (p.\,\pageref{classost_1_1_keydata})} objects are used to load and hold \char`\"{}configuration\char`\"{} data for a given application.load text configuration files into keyword pairs.  


{\tt \#include $<$misc.h$>$}

Inheritance diagram for ost::Keydata::\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classost_1_1_keydata}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf load} (const char $\ast$keypath)
\begin{CompactList}\small\item\em Load additional key values into the currrent object from the specfied config source (a config file/section pair). \item\end{CompactList}\item 
void {\bf load\-Prefix} (const char $\ast$prefix, const char $\ast$keypath)
\begin{CompactList}\small\item\em Load additional key values into the currrent object from the specfied config source (a config file/section pair). \item\end{CompactList}\item 
void {\bf load\-File} (const char $\ast$filepath, const char $\ast$keys=NULL, const char $\ast$pre=NULL)
\begin{CompactList}\small\item\em Load additional keys into the current object using a real filename that is directly passed rather than a computed key path. \item\end{CompactList}\item 
void {\bf load} ({\bf Define} $\ast$pairs)
\begin{CompactList}\small\item\em Load default keywords into the current object. \item\end{CompactList}\item 
{\bf Keydata} ()
\begin{CompactList}\small\item\em Create an empty key data object. \item\end{CompactList}\item 
{\bf Keydata} (const char $\ast$keypath)
\begin{CompactList}\small\item\em Create a new key data object and use \char`\"{}Load\char`\"{} method to load an initial config file section into it. \item\end{CompactList}\item 
{\bf Keydata} ({\bf Define} $\ast$pairs, const char $\ast$keypath=NULL)
\begin{CompactList}\small\item\em Alternate constructor can take a define list and an optional pathfile to parse. \item\end{CompactList}\item 
virtual {\bf $\sim$Keydata} ()
\begin{CompactList}\small\item\em Destroy the keydata object and all allocated memory. \item\end{CompactList}\item 
void {\bf unlink} (void)
\begin{CompactList}\small\item\em Unlink the keydata object from the cache file stream. \item\end{CompactList}\item 
int {\bf get\-Count} (const char $\ast$sym)
\begin{CompactList}\small\item\em Get a count of the number of data \char`\"{}values\char`\"{} that is associated with a specific keyword. \item\end{CompactList}\item 
const char $\ast$ {\bf get\-First} (const char $\ast$sym)
\begin{CompactList}\small\item\em Get the first data value for a given keyword. \item\end{CompactList}\item 
const char $\ast$ {\bf get\-Last} (const char $\ast$sym)
\begin{CompactList}\small\item\em Get the last (most recently set) value for a given keyword. \item\end{CompactList}\item 
bool {\bf is\-Key} (const char $\ast$sym)
\begin{CompactList}\small\item\em Find if a given key exists. \item\end{CompactList}\item 
const char $\ast$ {\bf get\-String} (const char $\ast$sym, const char $\ast$def=NULL)
\begin{CompactList}\small\item\em Get a string value, with an optional default if missing. \item\end{CompactList}\item 
long {\bf get\-Long} (const char $\ast$sym, long def=0)
\begin{CompactList}\small\item\em Get a long value, with an optional default if missing. \item\end{CompactList}\item 
bool {\bf get\-Bool} (const char $\ast$key)
\begin{CompactList}\small\item\em Get a bool value. \item\end{CompactList}\item 
double {\bf get\-Double} (const char $\ast$key, double def=0.)
\begin{CompactList}\small\item\em Get a floating value. \item\end{CompactList}\item 
unsigned {\bf get\-Index} (char $\ast$$\ast$data, unsigned max)
\begin{CompactList}\small\item\em Get an index array of ALL keywords that are stored by the current keydata object. \item\end{CompactList}\item 
unsigned {\bf get\-Count} (void)
\begin{CompactList}\small\item\em Get the count of keyword indexes that are actually available so one can allocate a table to receive get\-Index. \item\end{CompactList}\item 
void {\bf set\-Value} (const char $\ast$sym, const char $\ast$data)
\begin{CompactList}\small\item\em Set (replace) the value of a given keyword. \item\end{CompactList}\item 
const char $\ast$const $\ast$ {\bf get\-List} (const char $\ast$sym)
\begin{CompactList}\small\item\em Return a list of all values set for the given keyword returned in order. \item\end{CompactList}\item 
void {\bf clr\-Value} (const char $\ast$sym)
\begin{CompactList}\small\item\em Clear all values associated with a given keyword. \item\end{CompactList}\item 
const char $\ast$ {\bf operator[$\,$]} (const char $\ast$keyword)
\begin{CompactList}\small\item\em A convient notation for accessing the keydata as an associative array of keyword/value pairs through the [] operator. \item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static void {\bf end} (void)
\begin{CompactList}\small\item\em static member to end keydata i/o allocations. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Keysym} $\ast$ {\bf get\-Symbol} (const char $\ast$sym, bool create)
\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
void {\bf end\-Keydata} (void)
\begin{CompactList}\small\item\em Shutdown the file stream cache. \item\end{CompactList}\end{CompactItemize}
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct {\bf Define}
\item 
struct {\bf Keysym}
\item 
struct {\bf Keyval}
\end{CompactItemize}


\subsection{Detailed Description}
{\bf Keydata}{\rm (p.\,\pageref{classost_1_1_keydata})} objects are used to load and hold \char`\"{}configuration\char`\"{} data for a given application.load text configuration files into keyword pairs. 

This class is used to load and then hold \char`\"{}$<$code$>$keyword = value$<$/code$>$\char`\"{} pairs parsed from a text based \char`\"{}config\char`\"{} file that has been divided into \char`\"{}$<$code$>$[sections]$<$/code$>$\char`\"{}. The syntax is:

{\tt \small\begin{alltt}
 [section\_name]
 key1=value1
 key2=value2\end{alltt}\normalsize 
}

Essentially, the \char`\"{}path\char`\"{} is a \char`\"{}keypath\char`\"{} into a theoretical namespace of key pairs, hence one does not use \char`\"{}real\char`\"{} filepaths that may be OS dependent. The \char`\"{}$<$code$>$/$<$/code$>$\char`\"{} path refers to \char`\"{}$<$code$>$/etc$<$/code$>$\char`\"{} prefixed (on UNIX) directories and this is processed within the constructor. It could refer to the {\tt /config} prefix on QNX, or even, gasp, a \char`\"{}$<$code$>$C:$\backslash$WINDOWS$<$/code$>$\char`\"{}. Hence, a keypath of \char`\"{}$<$code$>$/bayonne.d/vmhost/smtp$<$/code$>$\char`\"{} actually resolves to a \char`\"{}$<$code$>$/etc/bayonne.d/vmhost.conf$<$/code$>$\char`\"{} and loads key value pairs from the {\tt [smtp]} section of that {\tt .conf} file.

Similarly, something like \char`\"{}$<$code$>$$\sim$bayonne/smtp$<$/code$>$\char`\"{} path refers to a \char`\"{}$<$code$>$$\sim$/.bayonnerc$<$/code$>$\char`\"{} and loads key pairs from the {\tt [smtp]} section. This coercion occurs before the name is passed to the open call.

I actually use derived keydata based classes as global initialized objects, and they hence automatically load and parse config file entries even before \char`\"{}main\char`\"{} has started.

{\bf Keydata}{\rm (p.\,\pageref{classost_1_1_keydata})} can hold multiple values for the same key pair. This can occur either from storing a \char`\"{}list\char`\"{} of data items in a config file, or when overlaying multiple config sources (such as {\tt /etc/....conf} and {\tt $\sim$/.confrc} segments) into a single object. The keys are stored as cumulative (read-only/replacable) config values under a hash index system for quick retrieval.

{\bf Keydata}{\rm (p.\,\pageref{classost_1_1_keydata})} can also load a table of \char`\"{}initialization\char`\"{} values for keyword pairs that were not found in the external file.

One typically derives an application specific keydata class to load a specific portion of a known config file and initialize it's values. One can then declare a global instance of these objects and have configuration data initialized automatically as the executable is loaded.

Hence, if I have a \char`\"{}[paths]\char`\"{} section in a \char`\"{}$<$code$>$/etc/server.conf?$<$/code$>$\char`\"{} file, I might define something like:

{\tt \small\begin{alltt}
 class KeyPaths : public {\bf Keydata}{\rm (p.\,\pageref{classost_1_1_keydata})}
 \{
   public:
     KeyPaths() : {\bf Keydata}{\rm (p.\,\pageref{classost_1_1_keydata})}("/server/paths")
     \{
       static {\bf Keydata::Define}{\rm (p.\,\pageref{structost_1_1_keydata_1_1_define})} *defvalues = \{
 	  \{"datafiles", "/var/server"\},
 	  \{NULL, NULL\}\};\end{alltt}\normalsize 
}

{\tt \small\begin{alltt}       // override with [paths] from "~/.serverrc" if avail.\end{alltt}\normalsize 
}

{\tt \small\begin{alltt}       load("~server/paths");
       load(defvalues);
     \}
 \};\end{alltt}\normalsize 
}

{\tt \small\begin{alltt} KeyPaths keypaths;
 \end{alltt}\normalsize 
}

\begin{Desc}
\item[Author:]David Sugar $<${\tt dyfet@ostel.com}$>$ \end{Desc}




\subsection{Constructor \& Destructor Documentation}
\index{ost::Keydata@{ost::Keydata}!Keydata@{Keydata}}
\index{Keydata@{Keydata}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Keydata::Keydata ()}\label{classost_1_1_keydata_7b38a93f1804700e069c071e7e71ec82}


Create an empty key data object. 

\index{ost::Keydata@{ost::Keydata}!Keydata@{Keydata}}
\index{Keydata@{Keydata}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Keydata::Keydata (const char $\ast$ {\em keypath})}\label{classost_1_1_keydata_5d1fabffff1ebfef8b8ef3fcb610497d}


Create a new key data object and use \char`\"{}Load\char`\"{} method to load an initial config file section into it. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em keypath}](filepath/section) specifies the home path. \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!Keydata@{Keydata}}
\index{Keydata@{Keydata}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}ost::Keydata::Keydata ({\bf Define} $\ast$ {\em pairs}, const char $\ast$ {\em keypath} = {\tt NULL})}\label{classost_1_1_keydata_2ffbfc1fc3162cf22bfd3699a61aa58b}


Alternate constructor can take a define list and an optional pathfile to parse. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pairs}]of keyword values from a define list \item[{\em keypath}]of optional file and section to load from \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!~Keydata@{$\sim$Keydata}}
\index{~Keydata@{$\sim$Keydata}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual ost::Keydata::$\sim$Keydata ()\hspace{0.3cm}{\tt  [virtual]}}\label{classost_1_1_keydata_ea7231d3fea8750126d1904699638c94}


Destroy the keydata object and all allocated memory. 

This may also clear the \char`\"{}cache\char`\"{} file stream if no other keydata objects currently reference it. 

\subsection{Member Function Documentation}
\index{ost::Keydata@{ost::Keydata}!clrValue@{clrValue}}
\index{clrValue@{clrValue}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Keydata::clr\-Value (const char $\ast$ {\em sym})}\label{classost_1_1_keydata_68af2fafb65d0d583d62c351faca42cd}


Clear all values associated with a given keyword. 

This does not de-allocate the keyword from memory, however.

\begin{Desc}
\item[Returns:]keyword name to clear. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!end@{end}}
\index{end@{end}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}static void ost::Keydata::end (void)\hspace{0.3cm}{\tt  [static]}}\label{classost_1_1_keydata_f16246e1f7c5af075493bf37d7e1b48f}


static member to end keydata i/o allocations. 

\index{ost::Keydata@{ost::Keydata}!getBool@{getBool}}
\index{getBool@{getBool}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Keydata::get\-Bool (const char $\ast$ {\em key})}\label{classost_1_1_keydata_297f5a7239a22576f770b038baac564f}


Get a bool value. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword name. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true or false. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!getCount@{getCount}}
\index{getCount@{getCount}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned ost::Keydata::get\-Count (void)}\label{classost_1_1_keydata_177f94fc01430d2f5e4a79cbbea64b03}


Get the count of keyword indexes that are actually available so one can allocate a table to receive get\-Index. 

\begin{Desc}
\item[Returns:]number of keywords found. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!getCount@{getCount}}
\index{getCount@{getCount}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int ost::Keydata::get\-Count (const char $\ast$ {\em sym})}\label{classost_1_1_keydata_5d2ee13740be6e901db41dfb0e0033b6}


Get a count of the number of data \char`\"{}values\char`\"{} that is associated with a specific keyword. 

Each value is from an accumulation of \char`\"{}$<$code$>$load()$<$/code$>$\char`\"{} requests.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword symbol name. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]count of values associated with keyword. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!getDouble@{getDouble}}
\index{getDouble@{getDouble}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}double ost::Keydata::get\-Double (const char $\ast$ {\em key}, double {\em def} = {\tt 0.})}\label{classost_1_1_keydata_727c000bb0cbbe8132d676e00e4b7424}


Get a floating value. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword name. \item[{\em default}]if not set. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]value of key. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!getFirst@{getFirst}}
\index{getFirst@{getFirst}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ ost::Keydata::get\-First (const char $\ast$ {\em sym})}\label{classost_1_1_keydata_2412a569a18725e0368f445f4f1cc07a}


Get the first data value for a given keyword. 

This will typically be the {\tt /etc} set global default.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword symbol name. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]first set value for this symbol. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!getIndex@{getIndex}}
\index{getIndex@{getIndex}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned ost::Keydata::get\-Index (char $\ast$$\ast$ {\em data}, unsigned {\em max})}\label{classost_1_1_keydata_85b680ae3a530b5261c9e4993365e6cd}


Get an index array of ALL keywords that are stored by the current keydata object. 

\begin{Desc}
\item[Returns:]number of keywords found. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]pointer of array to hold keyword strings. \item[{\em max}]number of entries the array can hold. \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!getLast@{getLast}}
\index{getLast@{getLast}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ ost::Keydata::get\-Last (const char $\ast$ {\em sym})}\label{classost_1_1_keydata_b2286284aff76cf9e310698ff6f22107}


Get the last (most recently set) value for a given keyword. 

This is typically the value actually used.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword symbol name. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]last set value for this symbol. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!getList@{getList}}
\index{getList@{getList}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ const$\ast$ ost::Keydata::get\-List (const char $\ast$ {\em sym})}\label{classost_1_1_keydata_ffdaf274202fe5bb12b6dc720f2cb3b7}


Return a list of all values set for the given keyword returned in order. 

\begin{Desc}
\item[Returns:]list pointer of array holding all keyword values. \end{Desc}
\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword name to fetch. \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!getLong@{getLong}}
\index{getLong@{getLong}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long ost::Keydata::get\-Long (const char $\ast$ {\em sym}, long {\em def} = {\tt 0})}\label{classost_1_1_keydata_d950a91035be68c3b790dc783d286651}


Get a long value, with an optional default if missing. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword name. \item[{\em default}]if not present. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]long value of key. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!getString@{getString}}
\index{getString@{getString}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ ost::Keydata::get\-String (const char $\ast$ {\em sym}, const char $\ast$ {\em def} = {\tt NULL})}\label{classost_1_1_keydata_7fcd3ce05319e4268064386784a714c5}


Get a string value, with an optional default if missing. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword name. \item[{\em default}]if not present. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]string value of key. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!getSymbol@{getSymbol}}
\index{getSymbol@{getSymbol}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Keysym}$\ast$ ost::Keydata::get\-Symbol (const char $\ast$ {\em sym}, bool {\em create})\hspace{0.3cm}{\tt  [protected]}}\label{classost_1_1_keydata_76bcec1ca452d8811d797a7fea2c9e96}


\index{ost::Keydata@{ost::Keydata}!isKey@{isKey}}
\index{isKey@{isKey}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool ost::Keydata::is\-Key (const char $\ast$ {\em sym})}\label{classost_1_1_keydata_73ef6b10342042f626b109c24e821b22}


Find if a given key exists. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword to find. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if exists. \end{Desc}
\index{ost::Keydata@{ost::Keydata}!load@{load}}
\index{load@{load}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Keydata::load ({\bf Define} $\ast$ {\em pairs})}\label{classost_1_1_keydata_824f678a4920e40704ae17ef70b47290}


Load default keywords into the current object. 

This only loads keyword entries which have not already been defined to reduce memory usage. This form of Load is also commonly used in the constructor of a derived {\bf Keydata}{\rm (p.\,\pageref{classost_1_1_keydata})} class.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em pairs}]list of NULL terminated default keyword/value pairs. \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!load@{load}}
\index{load@{load}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Keydata::load (const char $\ast$ {\em keypath})}\label{classost_1_1_keydata_aa445cbcd2cb56f8fab7e3063a55ba24}


Load additional key values into the currrent object from the specfied config source (a config file/section pair). 

These values will overlay the current keywords when matches are found. This can be used typically in a derived config object class constructor to first load a {\tt /etc} section, and then load a matching user specific entry from {\tt $\sim$/.} to override default system values with user specific keyword values.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em keypath}](filepath/section) \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!loadFile@{loadFile}}
\index{loadFile@{loadFile}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Keydata::load\-File (const char $\ast$ {\em filepath}, const char $\ast$ {\em keys} = {\tt NULL}, const char $\ast$ {\em pre} = {\tt NULL})}\label{classost_1_1_keydata_739656231534d299d250d7ac85cb5b52}


Load additional keys into the current object using a real filename that is directly passed rather than a computed key path. 

This also uses a [keys] section as passed to the object.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filepath}]to load from \item[{\em keys}]section to parse from, or NULL to parse from head \item[{\em pre}]optional key prefix \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!loadPrefix@{loadPrefix}}
\index{loadPrefix@{loadPrefix}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Keydata::load\-Prefix (const char $\ast$ {\em prefix}, const char $\ast$ {\em keypath})}\label{classost_1_1_keydata_d5c9a37238043d8daf932e0fdc9c64e1}


Load additional key values into the currrent object from the specfied config source (a config file/section pair). 

These values will overlay the current keywords when matches are found. This can be used typically in a derived config object class constructor to first load a {\tt /etc} section, and then load a matching user specific entry from {\tt $\sim$/.} to override default system values with user specific keyword values. This varient puts a prefix in front of the key name.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em prefix}]\item[{\em keypath}](filepath/section) \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!operator[]@{operator[]}}
\index{operator[]@{operator[]}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ ost::Keydata::operator[$\,$] (const char $\ast$ {\em keyword})\hspace{0.3cm}{\tt  [inline]}}\label{classost_1_1_keydata_1891928115aa1007abe42d81a695c205}


A convient notation for accessing the keydata as an associative array of keyword/value pairs through the [] operator. 

\index{ost::Keydata@{ost::Keydata}!setValue@{setValue}}
\index{setValue@{setValue}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Keydata::set\-Value (const char $\ast$ {\em sym}, const char $\ast$ {\em data})}\label{classost_1_1_keydata_815ad7e73ec110d57f205f8971972a0c}


Set (replace) the value of a given keyword. 

This new value will become the value returned from {\bf get\-Last()}{\rm (p.\,\pageref{classost_1_1_keydata_b2286284aff76cf9e310698ff6f22107})}, while the prior value will still be stored and found from {\tt {\bf get\-List()}{\rm (p.\,\pageref{classost_1_1_keydata_ffdaf274202fe5bb12b6dc720f2cb3b7})}}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em sym}]keyword name to set. \item[{\em data}]string to store for the keyword. \end{description}
\end{Desc}
\index{ost::Keydata@{ost::Keydata}!unlink@{unlink}}
\index{unlink@{unlink}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void ost::Keydata::unlink (void)}\label{classost_1_1_keydata_5a9b6469b627a674e5e9856707732b29}


Unlink the keydata object from the cache file stream. 

This should be used if you plan to keepa {\bf Keydata}{\rm (p.\,\pageref{classost_1_1_keydata})} object after it is loaded once all keydata objects have been loaded, otherwise the cfg\-File stream will remain open. You can also use {\bf end\-Keydata()}{\rm (p.\,\pageref{classost_1_1_keydata_b2cdccf30c8543716905fbc6dfa29c92})}. 

\subsection{Friends And Related Function Documentation}
\index{ost::Keydata@{ost::Keydata}!endKeydata@{endKeydata}}
\index{endKeydata@{endKeydata}!ost::Keydata@{ost::Keydata}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void end\-Keydata (void)\hspace{0.3cm}{\tt  [friend]}}\label{classost_1_1_keydata_b2cdccf30c8543716905fbc6dfa29c92}


Shutdown the file stream cache. 

This should be used before detaching a deamon, {\tt exec()}, {\tt fork()}, etc. 

The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
{\bf misc.h}\end{CompactItemize}