-
Notifications
You must be signed in to change notification settings - Fork 2
/
function.h
50 lines (41 loc) · 1.09 KB
/
function.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#ifndef INCLUDE_BLASSIC_FUNCTION_H
#define INCLUDE_BLASSIC_FUNCTION_H
// function.h
// Revision 7-feb-2005
#include "codeline.h"
#include <string>
class ParameterList {
public:
ParameterList ();
ParameterList (const ParameterList & pl);
~ParameterList ();
ParameterList & operator= (const ParameterList & pl);
void push_back (const std::string & name);
size_t size () const;
//const std::string & operator [] (size_t n) const;
std::string operator [] (size_t n) const;
private:
class Internal;
Internal * pin;
};
class Function {
public:
enum DefType { DefSingle, DefMulti };
Function (const std::string & strdef, const ParameterList & param);
Function (ProgramPos posfn, const ParameterList & param);
Function (const Function & f);
~Function ();
Function & operator= (const Function &);
DefType getdeftype () const;
CodeLine & getcode ();
ProgramPos getpos () const;
const ParameterList & getparam ();
static void clear ();
void insert (const std::string & name);
static Function & get (const std::string & name);
private:
class Internal;
Internal * pin;
};
#endif
// Fin de function.h