-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNameBase.h
40 lines (33 loc) · 1.13 KB
/
NameBase.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
#ifndef __NameBaseH__H
#define __NameBaseH__H
#include <stdio.h>
#include <string>
#include <map>
using namespace std;
//==============================================================================
class NameBase
{
public:
NameBase();
virtual ~ NameBase();
string AutoName(string = "_");
void Dump(FILE * = stdout);
static NameBase * Find(unsigned);
string FullName(unsigned = 1);
unsigned Id();
void Id(unsigned);
string Name();
void Name(string);
NameBase * Npar();
void Npar(NameBase *);
unsigned Uid();
private:
NameBase * npar;
string name;
unsigned id;
bool rtrap;
static unsigned uid;
static map<unsigned,NameBase *> NBmap;
};
//==============================================================================
#endif