varconf
1.0.3
Configuration library for the Worldforge system.
Main Page
Classes
Files
File List
dynvar.h
1
/*
2
* dynvar.h - interface functions for dynamically derived Variable
3
* Copyright (C) 2001, Ron Steinke
4
*
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
9
*
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
14
*
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
*
19
* Contact: Joseph Zupko
20
* jaz147@psu.edu
21
*
22
* 189 Reese St.
23
* Old Forge, PA 18518
24
*/
25
26
#ifndef VARCONF_DYNVAR_H
27
#define VARCONF_DYNVAR_H
28
29
#include "variable.h"
30
#include "dynbase.h"
31
#include "dyntypes.h"
32
#include "dyncmp.h"
33
34
namespace
varconf
{
35
namespace
dynvar {
36
37
inline
Variable concat(
const
Variable& one,
const
Variable& two)
38
{
return
Variable(
new
Concat(one, two)); }
39
40
inline
Variable ternary(
const
Variable& test,
const
Variable& true_val,
41
const
Variable& false_val)
42
{
return
Variable(
new
Ternary(test, true_val, false_val)); }
43
44
inline
Variable item(
const
std::string& section,
const
std::string& key)
45
{
return
Variable(
new
Item(section, key)); }
46
47
inline
Variable equal(
const
Variable& one,
const
Variable& two)
48
{
return
Variable(
new
Equal(one, two)); }
49
50
inline
Variable noteq(
const
Variable& one,
const
Variable& two)
51
{
return
Variable(
new
NotEq(one, two)); }
52
53
inline
Variable greater(
const
Variable& one,
const
Variable& two)
54
{
return
Variable(
new
Greater(one, two)); }
55
56
inline
Variable greatereq(
const
Variable& one,
const
Variable& two)
57
{
return
Variable(
new
GreaterEq(one, two)); }
58
59
inline
Variable less(
const
Variable& one,
const
Variable& two)
60
{
return
Variable(
new
Less(one, two)); }
61
62
inline
Variable lesseq(
const
Variable& one,
const
Variable& two)
63
{
return
Variable(
new
LessEq(one, two)); }
64
65
}}
// namespace varconf::dynvar
66
67
#endif
varconf
Definition:
config.cpp:95
src
varconf
dynvar.h
Generated by
1.8.11