]> Creatis software - gdcm.git/blobdiff - src/gdcmDocument.h
Move as private some methods, in order not to confuse the users
[gdcm.git] / src / gdcmDocument.h
index 1d8ce95c005e05588314684ccd684c975b4d39f9..e72c8bb5aad1b642f655c34376253d47989b6405 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocument.h,v $
   Language:  C++
-  Date:      $Date: 2005/10/19 12:01:51 $
-  Version:   $Revision: 1.126 $
+  Date:      $Date: 2005/11/14 14:23:44 $
+  Version:   $Revision: 1.130 $
  
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -39,9 +39,10 @@ class Dict;
  */
 class GDCM_EXPORT Document : public ElementSet
 {
-public:
+   gdcmTypeMacro(Document);
 
-typedef std::list<DicomElement> ListElements;
+public:
+   typedef std::list<DicomElement> ListElements;
 
 // Loading
    //Deprecated : use SetFileName() + Load()
@@ -66,15 +67,6 @@ typedef std::list<DicomElement> ListElements;
 // Swap code
    /// 'Swap code' accessor (see \ref SwapCode )
    int GetSwapCode() { return SwapCode; }
-   // System access (meaning endian related !?)
-   uint16_t SwapShort(uint16_t);
-   uint32_t SwapLong(uint32_t);
-   /// \brief  Unswaps back the bytes of 2-bytes long integer 
-   ///         so they agree with the processor order.
-   uint16_t UnswapShort(uint16_t a) { return SwapShort(a);}
-   /// \brief  Unswaps back the bytes of 4-byte long integer 
-   ///         so they agree with the processor order.
-   uint32_t UnswapLong(uint32_t a) { return SwapLong(a);}
    
 // File I/O
    /// Accessor to \ref Filename
@@ -182,7 +174,19 @@ protected:
 private:
 // Methods
    void Initialize();
-   bool DoTheLoadingDocumentJob();
+   bool DoTheLoadingDocumentJob(); 
+     
+      // System access (meaning endian related !?)
+   uint16_t SwapShort(uint16_t);
+   uint32_t SwapLong(uint32_t);
+   double SwapDouble(double);
+   /// \brief  Unswaps back the bytes of 2-bytes long integer 
+   ///         so they agree with the processor order.
+   uint16_t UnswapShort(uint16_t a) { return SwapShort(a);}
+   /// \brief  Unswaps back the bytes of 4-byte long integer 
+   ///         so they agree with the processor order.
+   uint32_t UnswapLong(uint32_t a) { return SwapLong(a);}
+   
    // Read
    void ParseDES(DocEntrySet *set, long offset, long l_max, bool delim_mode);
    void ParseSQ (SeqEntry *seq,    long offset, long l_max, bool delim_mode);
@@ -222,7 +226,12 @@ private:
    /// this upper bound is fixed to 1024 bytes (which might look reasonable
    /// when one considers the definition of the various VR contents).
    uint32_t MaxSizeLoadEntry;
-   
+
+   /// \brief to allow any inner method to know current tag Group number 
+   uint16_t CurrentGroup;
+   /// \brief to allow any inner method to know current tag Element number 
+   uint16_t CurrentElem; 
+     
 //  uint32_t GenerateFreeTagKeyInGroup(uint16_t group);
 //  void BuildFlatHashTableRecurse( TagDocEntryHT &builtHT,
 //                                  DocEntrySet *set );