GDCM  2.2.6
gdcmParseException.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: GDCM (Grassroots DICOM). A DICOM library
4 
5  Copyright (c) 2006-2011 Mathieu Malaterre
6  All rights reserved.
7  See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 
13 =========================================================================*/
14 #ifndef GDCMPARSEEXCEPTION_H
15 #define GDCMPARSEEXCEPTION_H
16 
17 #include "gdcmException.h"
18 #include "gdcmDataElement.h"
19 
20 namespace gdcm
21 {
26 class ParseException : public Exception
27 {
28 public:
30  {
31  }
32  virtual ~ParseException() throw() {}
33 
36  {
37  (void)orig;
38  //TODO
39  return *this;
40  }
41 
43 /* virtual bool operator==( const ParseException &orig )
44  {
45  return true;
46  }*/
47 
48 /*
49  // Multiple calls to what ??
50  const char* what() const throw()
51  {
52  static std::string strwhat;
53  std::ostringstream oswhat;
54  oswhat << File << ":" << Line << ":\n";
55  oswhat << Description;
56  strwhat = oswhat.str();
57  return strwhat.c_str();
58  }
59 */
61  {
62  LastElement = de;
63  }
64  const DataElement& GetLastElement() const { return LastElement; }
65 
66 private:
67  // Store last parsed element before error:
68  DataElement LastElement;
69 };
70 
71 } // end namespace gdcm
72 
73 #endif
void SetLastElement(DataElement &de)
Definition: gdcmParseException.h:60
ParseException Standard exception handling object.
Definition: gdcmParseException.h:26
ParseException()
Definition: gdcmParseException.h:29
virtual ~ParseException()
Definition: gdcmParseException.h:32
Class to represent a Data Element either Implicit or Explicit.
Definition: gdcmDataElement.h:58
ParseException & operator=(const ParseException &orig)
Definition: gdcmParseException.h:35
const DataElement & GetLastElement() const
Definition: gdcmParseException.h:64
Exception.
Definition: gdcmException.h:33

Generated on Sat Dec 21 2013 05:56:17 for GDCM by doxygen 1.8.5
SourceForge.net Logo