File: GdlObject.h

package info (click to toggle)
grcompiler 4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,076 kB
  • ctags: 5,163
  • sloc: cpp: 45,565; sh: 4,451; ansic: 4,377; makefile: 185; xml: 175; perl: 127
file content (78 lines) | stat: -rw-r--r-- 1,945 bytes parent folder | download | duplicates (7)
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/*--------------------------------------------------------------------*//*:Ignore this sentence.
Copyright (C) 1999, 2001 SIL International. All rights reserved.

Distributable under the terms of either the Common Public License or the
GNU Lesser General Public License, as specified in the LICENSING.txt file.

File: GdlObject.h
Responsibility: Sharon Correll
Last reviewed: Not yet.

Description:
    Contains definitions of simple abstract superclasses needed for parser and compiler.
-------------------------------------------------------------------------------*//*:End Ignore*/
#ifdef _MSC_VER
#pragma once
#endif
#ifndef GDLOBJECT_INCLUDED
#define GDLOBJECT_INCLUDED

/*----------------------------------------------------------------------------------------------
Class: GdlObject
Description: General abstract superclass subsuming classes of objects corresponding to
	structures in the GDL file, specifically those that are created by the parser.
Hungarian: gdl
----------------------------------------------------------------------------------------------*/
class GdlObject
{
public:
	GdlObject()
	{
		m_lnf = GrpLineAndFile(0, 0, "");
	}
	GdlObject(const GdlObject & gdl)
	{
		m_lnf = gdl.m_lnf;
	}

	void SetLineAndFile(GrpLineAndFile const& lnf)
	{
		m_lnf = lnf;
	}
	void CopyLineAndFile(const GdlObject & gdl)
	{
		m_lnf = gdl.m_lnf;
	}

	GrpLineAndFile & LineAndFile()
	{
		return m_lnf;
	}

	bool LineIsZero()
	{
		return m_lnf.PreProcessedLine() == 0;
	}

protected:
	//	instance variables:
	GrpLineAndFile m_lnf;
};


/*----------------------------------------------------------------------------------------------
Class: GdlDefn
Description: Abstract class subsuming GdlGlyphClassDefn and GdlFeatureDefn. 
Hungarian: defn
----------------------------------------------------------------------------------------------*/
class GdlDefn : public GdlObject
{
public:
	virtual ~GdlDefn()
	{
	}
};


#endif // !GDLOBJECT_INCLUDED