-
Notifications
You must be signed in to change notification settings - Fork 5
/
type.h
62 lines (46 loc) · 1.42 KB
/
type.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
51
52
53
54
55
56
57
58
59
60
61
62
/*
This is type.h
Coxeter version 3.0 Copyright (C) 2002 Fokko du Cloux
See file main.cpp for full copyright notice
*/
#ifndef TYPE_H /* guard against multiple inclusions */
#define TYPE_H
#include "globals.h"
#include "io.h"
namespace coxeter {
/******** type declarations *************************************************/
class Type;
/******** function declarations *********************************************/
bool isAffineType(const Type& type);
bool isFiniteType(const Type& type);
bool isTypeA(const Type& type);
bool isTypeB(const Type& type);
bool isTypeD(const Type& type);
/******** type definitions **************************************************/
using namespace io;
class Type {
private:
String d_name;
public:
// constructors and destructors
void operator delete(void* ptr)
{return arena().free(ptr,sizeof(Type));}
Type();
Type(const char*);
~Type();
// accessors
const char& operator[] (const Ulong& j) const;
const String& name() const;
// manipulators
char& operator[] (const Ulong& j);
String& name();
};
const Type undef_type("");
/******** inlined definitions **********************************************/
inline const char& Type::operator[] (const Ulong& j) const
{return d_name[j];}
inline const String& Type::name() const {return d_name;}
inline char& Type::operator[] (const Ulong& j) {return d_name[j];}
inline String& Type::name() {return d_name;}
};
#endif