forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathppSubroutine.h
More file actions
39 lines (30 loc) · 1.08 KB
/
ppSubroutine.h
File metadata and controls
39 lines (30 loc) · 1.08 KB
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
// Filename: ppSubroutine.h
// Created by: drose (10Oct00)
//
////////////////////////////////////////////////////////////////////
#ifndef PPSUBROUTINE_H
#define PPSUBROUTINE_H
#include "ppremake.h"
#include <vector>
#include <map>
///////////////////////////////////////////////////////////////////
// Class : PPSubroutine
// Description : This represents a named subroutine defined via the
// #defsub .. #end sequence that may be invoked at any
// time via #call. All subroutine definitions are
// global.
////////////////////////////////////////////////////////////////////
class PPSubroutine {
public:
vector<string> _formals;
vector<string> _lines;
public:
static void define_sub(const string &name, PPSubroutine *sub);
static const PPSubroutine *get_sub(const string &name);
static void define_func(const string &name, PPSubroutine *sub);
static const PPSubroutine *get_func(const string &name);
typedef map<string, PPSubroutine *> Subroutines;
static Subroutines _subroutines;
static Subroutines _functions;
};
#endif