PEBL
2.2
Psychology Experiment Building Language - Cross-platform psychological experiment development system
FunctionMap.h
Go to the documentation of this file.
1
//* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
3
// Name: src/base/FunctionMap.h
4
// Purpose: Structure that holds user-defined functions
5
// Author: Shane T. Mueller, Ph.D.
6
// Copyright: (c) 2003--2016 Shane T. Mueller <smueller@obereed.net>
7
// License: GPL 2
8
//
9
//
10
//
11
// This file is part of the PEBL project.
12
//
13
// PEBL is free software; you can redistribute it and/or modify
14
// it under the terms of the GNU General Public License as published by
15
// the Free Software Foundation; either version 2 of the License, or
16
// (at your option) any later version.
17
//
18
// PEBL is distributed in the hope that it will be useful,
19
// but WITHOUT ANY WARRANTY; without even the implied warranty of
20
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
// GNU General Public License for more details.
22
//
23
// You should have received a copy of the GNU General Public License
24
// along with PEBL; if not, write to the Free Software
25
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
27
28
#ifndef __FUNCTIONMAP_H__
29
#define __FUNCTIONMAP_H__
30
31
#include "
PNode.h
"
32
#include <map>
33
#include <string>
34
35
class
PNode
;
36
40
44
45
class
FunctionMap
{
46
public
:
47
49
FunctionMap
();
51
~FunctionMap
();
52
53
void
AddFunction
(std::string funcname,
OpNode
* node);
54
// void AddFunction(OpNode * node);
55
PNode
*
GetFunction
(
const
std::string & funcname);
56
bool
IsFunction
(
const
std::string & funcname);
57
void
Erase
(
const
std::string & funcname);
58
void
DumpValues
();
59
void
Destroy
();
//destroys everything in the functionmap, for good.
60
61
private
:
62
65
std::map<std::string, PNode* > mFunctionMap;
66
67
68
};
69
70
71
#endif
PNode.h
FunctionMap
Definition
FunctionMap.h:45
FunctionMap::~FunctionMap
~FunctionMap()
The Standard destructor.
Definition
FunctionMap.cpp:59
FunctionMap::FunctionMap
FunctionMap()
The Standard constructor.
Definition
FunctionMap.cpp:53
FunctionMap::Destroy
void Destroy()
Definition
FunctionMap.cpp:69
FunctionMap::IsFunction
bool IsFunction(const std::string &funcname)
Definition
FunctionMap.cpp:182
FunctionMap::DumpValues
void DumpValues()
Definition
FunctionMap.cpp:212
FunctionMap::AddFunction
void AddFunction(std::string funcname, OpNode *node)
Definition
FunctionMap.cpp:94
FunctionMap::GetFunction
PNode * GetFunction(const std::string &funcname)
Definition
FunctionMap.cpp:140
FunctionMap::Erase
void Erase(const std::string &funcname)
Definition
FunctionMap.cpp:200
OpNode
Definition
PNode.h:103
PNode
Definition
PNode.h:45
src
base
FunctionMap.h
Generated by
1.9.8