variables.hpp File Reference

#include <map>
#include <string>

Go to the source code of this file.

Typedefs

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

Functions

std::string expand (std::string str, variable_map const *local_variables=0)

Variables

variable_map global_variables


Detailed Description

Definition in file variables.hpp.


Typedef Documentation

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

Listing 57-6. The variables.hpp File

Definition at line 9 of file variables.hpp.


Function Documentation

std::string expand ( std::string  str,
variable_map const *  local_variables = 0 
)

Expand variables in a string using a local map and the global map.

Parameters:
str The string to expand
local_variables The optional, local map; can be null
Returns:
The expanded string

Definition at line 26 of file variables.cpp.

References get_value().


Variable Documentation

variable_map global_variables

Listing 57-7. The variables.cpp File Implements the expand Function

Definition at line 5 of file variables.cpp.


Generated on Sun Nov 30 09:53:23 2008 for Exploring C++ - Final Forms of Key Examples by  doxygen 1.5.3