File: igstkPolarisWirelessConfigurationXMLFileReader.h

package info (click to toggle)
igstk 4.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 38,980 kB
  • sloc: cpp: 86,267; xml: 96; makefile: 75; python: 38
file content (106 lines) | stat: -rw-r--r-- 3,472 bytes parent folder | download | duplicates (2)
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
/*=========================================================================

  Program:   Image Guided Surgery Software Toolkit
  Module:    $RCSfile: igstkPolarisWirelessConfigurationXMLFileReader.h,v $
  Language:  C++
  Date:      $Date: 2009-01-30 20:48:03 $
  Version:   $Revision: 1.1 $

  Copyright (c) ISC  Insight Software Consortium.  All rights reserved.
  See IGSTKCopyright.txt or http://www.igstk.org/copyright.htm for details.

     This software is distributed WITHOUT ANY WARRANTY; without even
     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
     PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

#ifndef __igstkPolarisWirelessConfigurationXMLFileReader_h
#define __igstkPolarisWirelessConfigurationXMLFileReader_h

#include <itkXMLFile.h>
#include "igstkSerialCommunicatingTrackerConfigurationXMLFileReader.h"
#include "igstkPolarisTrackerConfiguration.h"

namespace igstk
{
  
/**
 * \class PolarisWirelessConfigurationXMLFileReader 
 *
 * \brief This class is a super class
 *        for all of the wireless polaris (NDI) trackers. 
 *
 *        This class is a super class
 *        for all of the wireless polaris (NDI) trackers.
 *        NOTE: Only its decendants are actually used.
 */
class PolarisWirelessConfigurationXMLFileReader : 
   public SerialCommunicatingTrackerConfigurationXMLFileReader 
{
public:

  //standard typedefs
  typedef PolarisWirelessConfigurationXMLFileReader               Self;
  typedef SerialCommunicatingTrackerConfigurationXMLFileReader    Superclass;
  typedef itk::SmartPointer<Self>                                 Pointer;

  //run-time type information (and related methods)
  itkTypeMacro( PolarisWirelessConfigurationXMLFileReader, 
                SerialCommunicatingTrackerConfigurationXMLFileReader );

  /**
   * Method called when a new xml tag start is encountered.
   */
  virtual void StartElement( const char * name, const char **atts ); 


  /**
   * Method called when an xml tag end is encountered.
   */
  virtual void EndElement( const char *name ); 


   /**
   * Method for checking if the configuration data has been read. When the xml 
   * file is empty or doesn't contain the relevant tags the read operation is 
   * successful, but we don't have the information we need.
   */
  virtual bool HaveConfigurationData(); 


  /**
   * Return a pointer to the object containing the configuration data.
   */
  virtual const igstk::TrackerConfiguration::Pointer 
    GetTrackerConfigurationData() throw ( FileFormatException );


protected:
  //this is the constructor that is called by the factory to 
  //create a new object
  PolarisWirelessConfigurationXMLFileReader() : 
         SerialCommunicatingTrackerConfigurationXMLFileReader() { }
  virtual ~PolarisWirelessConfigurationXMLFileReader() { }

  void ProcessSromFile() throw ( FileFormatException );

  virtual void ProcessToolData() throw ( FileFormatException );

  virtual igstk::PolarisWirelessTrackerConfiguration::Pointer
    GetPolarisConfiguration()=0;

  std::string m_CurrentSromFileName;

private:
  PolarisWirelessConfigurationXMLFileReader( 
    const PolarisWirelessConfigurationXMLFileReader & other );


  const PolarisWirelessConfigurationXMLFileReader & operator=( 
    const PolarisWirelessConfigurationXMLFileReader & right );
};


}
#endif //__igstkPolarisWirelessConfigurationXMLFileReader_h