summaryrefslogtreecommitdiff
path: root/Build/source/libs/graphite-engine/src/segment/GrFeatureValues.h
blob: 97e6a1fe33c45f7c8d9caebda263e1a7bfeb1c2b (plain)
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
/*--------------------------------------------------------------------*//*: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: GrFeatureValues.h
Responsibility: Sharon Correll
Last reviewed: Not yet.

Description:
	

----------------------------------------------------------------------------------------------*/
#ifdef _MSC_VER
#pragma once
#endif
#ifndef GR_FEATVAL_INCLUDED
#define GR_FEATVAL_INCLUDED

//:End Ignore

namespace gr
{

/*----------------------------------------------------------------------------------------------
	A convenient way to group together style and feature information that interacts
	with the rules.
	
	Hungarian: fval
----------------------------------------------------------------------------------------------*/
class GrFeatureValues
{
	friend class GrCharStream;
	friend class GrSlotAbstract;
	friend class GrSlotState;

public:
	//	Standard constructor:
	GrFeatureValues()
	{
		m_nStyleIndex = 0;
		std::fill(m_rgnFValues, m_rgnFValues + kMaxFeatures, 0);
	}

	//	Copy constructor:
	GrFeatureValues(const GrFeatureValues & fval)
	{
		m_nStyleIndex = fval.m_nStyleIndex;
		std::copy(fval.m_rgnFValues, fval.m_rgnFValues + kMaxFeatures, m_rgnFValues);
	}

	//	For transduction logging:
#ifdef TRACING
	void WriteXductnLog(GrTableManager * ptman, std::ostream &);
#endif // TRACING

protected:
	int		m_nStyleIndex;
	int		m_rgnFValues[kMaxFeatures];
};

} // namespace gr


#endif // !GR_FEATVAL_INCLUDED