aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/lipi-toolkit/3rdparty/lipi-toolkit/src/include/LTKChannel.h
blob: e5328bfd2128a38b137b891e270ebd88947a6af0 (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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
/******************************************************************************
* Copyright (c) 2006 Hewlett-Packard Development Company, L.P.
* Permission is hereby granted, free of charge, to any person obtaining a copy 
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights 
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
* copies of the Software, and to permit persons to whom the Software is 
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
* SOFTWARE
********************************************************************************/

/******************************************************************************
 * SVN MACROS
 *
 * $LastChangedDate: 2008-07-10 15:23:21 +0530 (Thu, 10 Jul 2008) $
 * $Revision: 556 $
 * $Author: sharmnid $
 *
 ************************************************************************/

/************************************************************************
 * FILE DESCR: Definition of LTKChannel which has the description of a particular 
			 	input stream like x-coordinate stream, y-coordinate stream, 
				time, pressure etc.
 *
 * CONTENTS:   
 *
 * AUTHOR:     Balaji R.
 *
 * DATE:       December 23, 2004
 * CHANGE HISTORY:
 * Author		Date			Description of change
 ************************************************************************/

#ifndef __LTKCHANNEL_H
#define __LTKCHANNEL_H

#include "LTKTypes.h"

/**
* @ingroup Common_Classes
*/

/** @brief Stores information about a channel,whose value is captured by a digitizer. 
 * @class LTKChannel 
 * <p> Channels captured by a digitizer can have different data types. The memory storage for the
 * data types of these channels is thus different.
 * LIPI Toolkit requires coordinates to have "float" data type to have same memory allocation
 * for coordinate values. </p>
 *
 * <p> In order to retain the information about a channel,name, datatype, and a boolean (to indicate
 * if the channel is Regular or Intermittent) are stored in this class. </p>
 *
 * <p> LTKChannel class object has to be created prior to any request for recognition. These
 * objects are stored in LTKTraceFormat class. </p>
 * 
 * @see LTKTraceFormat
 * 
 */


class LTKChannel
{
private:
	
	string m_channelName;			//	logical name of the channel

	ELTKDataType m_channelType;		//	data type of values obtained from channel

	bool m_isRegularChannel;		//	flag to indicate if a value for the channel 
									//  is available at every sampling instance

public:
 
	/** @name Constructors and Destructor */
	
	//@{

	/**
	 * Default Constructor.
	 */
	
	LTKChannel();


	LTKChannel(const string& channelName);
   	
	/**
	 * This constructor initializes the members of the class
	 * @param channelName  Name of the channel
	 * @param ELTKDataType Data type of the channel is stored. This is stored only for information.
	 *                     Internally all channel values are stored as float.
	 * @param isRegular    Boolean variable that indicates if the channel is Regular or Intermittent.
	 * 
	 */

 	LTKChannel(const string& channelName, ELTKDataType channelType, bool isRegular);	

	/** 
	 * Copy Constructor
	 */
	
	LTKChannel(const LTKChannel& channel);
	
	/**
	 * Destructor
	 */
	
	~LTKChannel();
	//@}
	
	/**
	  * @name Assignment operator 
	  */
	//@{
	
	/**
	 * Assignment operator
	 * @param channelObj The object to be copied by assignment
	 *
	 * @return LTKChannel object
	 */
	
	LTKChannel& operator=(const LTKChannel& channel);
	//@}
	
	/**
	 * @name Getter Functions
	 */
	//@{ 
	
	/**
	 * This method returns data type of a channel
	 * @param void
	 *
	 * @return enum data type of ELTKDataType .
	 */
	
	ELTKDataType getChannelType() const;
	
	/**
	 * This method returns name of the channel.
	 * @param void
	 *
	 * @return name of the channel.
	 */

    string getChannelName() const;
	
	/**
	 * This method returns a boolen to indicate if the channel is regular or intermittent.
	 * @param void
	 *
	 * @return True if channel is Regular, False if channel is Intermittent.
	 */
	
	bool isRegularChannel() const;
	//@}
	
	/**
	 * @name Setter Functions
	 */
	//@{
	
	/**
	 * This method sets the type of a channel
	 * @param channelType The channel type passed should belong to ELTKDataType.
	 *
	 * @return SUCCESS on successful set operation
	 */
	
	void setChannelType(ELTKDataType channelType);
	
	/**
	 * This method sets the channel name
	 * @param channelName The name of the channel which a digitizer can capture.
	 *
	 * @return SUCCESS on successful set operation
	 */
	
	int setChannelName(const string& channelName);
	
	/**
	 * This method sets a boolean to indicate if the channel is Regular or Intermittent.
	 * @param isRegular boolean value to indicate if the channel is Regular or Intermittent.
	 *
	 * @return SUCCESS on successful set operation
	 */
	
	void setRegularChannel(bool isRegular);
	//@}

};

#endif
    
//#ifndef __LTKCHANNEL_H
//#define __LTKCHANNEL_H