/****************************************************************************** * 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: 2011-01-11 13:48:17 +0530 (Tue, 11 Jan 2011) $ * $Revision: 827 $ * $Author: mnab $ * ************************************************************************/ /************************************************************************ * FILE DESCR: implementation of LTKTrace which holds series of points * from a pen down event to the next immediate pen up event * * CONTENTS: * getNumberOfPoints * getPointAt * getChannelValues * getChannelValues (overloaded) * getChannelValueAt * setChannelValues * addPoint * getChannelNames * addChannel * getChannelIndex * * AUTHOR: Balaji R. * * DATE: December 23, 2004 * CHANGE HISTORY: * Author Date Description of change ************************************************************************/ #include "LTKTrace.h" #include "LTKMacros.h" #include "LTKTraceFormat.h" #include "LTKErrors.h" #include "LTKErrorsList.h" #include "LTKChannel.h" #include "LTKException.h" #include "LTKLoggerUtil.h" /****************************************************************************** * AUTHOR : Balaji R. * DATE : 23-DEC-2004 * NAME : LTKTrace * DESCRIPTION : Default Constructor * ARGUMENTS : * RETURNS : * NOTES : * CHANGE HISTROY * Author Date Description of change ******************************************************************************/ LTKTrace::LTKTrace() { LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << "Entering: LTKTrace::LTKTrace()"< of these individual channels is computed, and such vectors * for all channels are collected into another vector. */ for(int channelIndex = 0; channelIndex < numChannels; ++channelIndex) { for(int inputIndex = channelIndex; inputIndex < inputStreamSize; inputIndex += numChannels) { tempChannel.push_back(inputStream[inputIndex]); } m_traceChannels.push_back(tempChannel); tempChannel.clear(); } LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << "Exiting: LTKTrace::LTKTrace(const floatVector&,const LTKTraceFormat& )"<= m_traceChannels[0].size() ) { LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Error: "<::const_iterator channelIterator = m_traceChannels.begin(); vector::const_iterator traceChannelsEnd = m_traceChannels.end(); for(; channelIterator != traceChannelsEnd; ++channelIterator) { outPointCoordinates.push_back((*channelIterator)[pointIndex]); } LOG( LTKLogger::LTK_LOGLEVEL_DEBUG) << "Exiting: LTKTrace::getPointAt()"<= m_traceFormat.getNumChannels()) { LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Error: "<= m_traceChannels[0].size() ) { LOG( LTKLogger::LTK_LOGLEVEL_ERR) << "Error: "<