]> Creatis software - gdcm.git/blobdiff - src/gdcmDocEntrySet.cxx
* Reorder source code
[gdcm.git] / src / gdcmDocEntrySet.cxx
index 9a44fc31942338bdafbe6a76873aac49f9c8fb51..6a4597f0944a11022eaf8148d218e02a3d95cddd 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDocEntrySet.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/26 09:49:54 $
-  Version:   $Revision: 1.47 $
+  Date:      $Date: 2005/02/02 16:18:48 $
+  Version:   $Revision: 1.52 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -28,6 +28,8 @@
 
 namespace gdcm 
 {
+//-----------------------------------------------------------------------------
+// Constructor / Destructor
 
 //-----------------------------------------------------------------------------
 // Public
@@ -54,7 +56,7 @@ std::string DocEntrySet::GetEntryValue(uint16_t group, uint16_t elem)
  */
 void *DocEntrySet::GetEntryBinArea(uint16_t group, uint16_t elem) 
 {
-   BinEntry *entry = GetBinEntry(group,elem);
+   BinEntry *entry = GetBinEntry(group, elem);
    if( entry )
       return entry->GetBinArea();
    return 0;
@@ -70,7 +72,7 @@ void *DocEntrySet::GetEntryBinArea(uint16_t group, uint16_t elem)
  */
 int DocEntrySet::GetEntryLength(uint16_t group, uint16_t elem)
 {
-   DocEntry *entry = GetDocEntry(group,elem);
+   DocEntry *entry = GetDocEntry(group, elem);
    if( entry )
       return entry->GetLength();
    return -1;
@@ -91,7 +93,7 @@ int DocEntrySet::GetEntryLength(uint16_t group, uint16_t elem)
  */
 std::string DocEntrySet::GetEntryVR(uint16_t group, uint16_t elem)
 {
-   DocEntry *entry = GetDocEntry(group,elem);
+   DocEntry *entry = GetDocEntry(group, elem);
    if( entry )
       return entry->GetVR();
    return GDCM_UNFOUND;
@@ -164,7 +166,7 @@ SeqEntry *DocEntrySet::GetSeqEntry(uint16_t group, uint16_t elem)
  * @param   group  group number of the Dicom Element to modify
  * @param   elem element number of the Dicom Element to modify
  */
-bool DocEntrySet::SetValEntry(std::string constcontent, 
+bool DocEntrySet::SetValEntry(std::string const &content, 
                               uint16_t group, uint16_t elem) 
 {
    ValEntry *entry = GetValEntry(group, elem);
@@ -303,7 +305,7 @@ ValEntry *DocEntrySet::InsertValEntry(std::string const &value,
  * \return  pointer to the modified/created Header Entry (NULL when creation
  *          failed).
  */
-BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea,int lgth, 
+BinEntry *DocEntrySet::InsertBinEntry(uint8_t *binArea, int lgth, 
                                       uint16_t group, uint16_t elem,
                                       TagName const &vr )
 {
@@ -429,24 +431,6 @@ bool DocEntrySet::CheckIfEntryExist(uint16_t group, uint16_t elem )
    return GetDocEntry(group,elem)!=NULL;
 }
 
-/**
- * \brief   Request a new virtual dict entry to the dict set
- * @param   group group  number of the underlying DictEntry
- * @param   elem  element number of the underlying DictEntry
- * @param   vr    VR (Value Representation) of the underlying DictEntry
- * @param   vm    VM (Value Multiplicity)   of the underlying DictEntry
- * @param   name   english name
- */
-DictEntry* DocEntrySet::NewVirtualDictEntry( uint16_t group,uint16_t elem,
-                                             TagName const & vr,
-                                             TagName const & vm,
-                                             TagName const & name )
-{
-   return Global::GetDicts()->NewVirtualDictEntry(group,elem,vr,vm,name);
-}
-
-//-----------------------------------------------------------------------------
-// Protected
 /**
  * \brief   Build a new Val Entry from all the low level arguments. 
  *          Check for existence of dictionary entry, and build
@@ -479,8 +463,8 @@ ValEntry *DocEntrySet::NewValEntry(uint16_t group,uint16_t elem,
  * @param   elem  element number of the new Entry
  * @param   vr     VR of the new Entry 
  */
-BinEntry *DocEntrySet::NewBinEntry(uint16_t group,uint16_t elem,
-                                   TagName const & vr) 
+BinEntry *DocEntrySet::NewBinEntry(uint16_t group, uint16_t elem,
+                                   TagName const &vr) 
 {
    DictEntry *dictEntry = GetDictEntry(group, elem, vr);
    gdcmAssertMacro(dictEntry);
@@ -501,7 +485,7 @@ BinEntry *DocEntrySet::NewBinEntry(uint16_t group,uint16_t elem,
  * @param   group group   number of the new Entry
  * @param   elem  element number of the new Entry
  */
-SeqEntry* DocEntrySet::NewSeqEntry(uint16_t group,uint16_t elem) 
+SeqEntry* DocEntrySet::NewSeqEntry(uint16_t group, uint16_t elem) 
 {
    DictEntry *dictEntry = GetDictEntry(group, elem, "SQ");
    gdcmAssertMacro(dictEntry);
@@ -515,6 +499,24 @@ SeqEntry* DocEntrySet::NewSeqEntry(uint16_t group,uint16_t elem)
    return newEntry;
 }
 
+/**
+ * \brief   Request a new virtual dict entry to the dict set
+ * @param   group group  number of the underlying DictEntry
+ * @param   elem  element number of the underlying DictEntry
+ * @param   vr    VR (Value Representation) of the underlying DictEntry
+ * @param   vm    VM (Value Multiplicity)   of the underlying DictEntry
+ * @param   name   english name
+ */
+DictEntry* DocEntrySet::NewVirtualDictEntry( uint16_t group,uint16_t elem,
+                                             TagName const & vr,
+                                             TagName const & vm,
+                                             TagName const & name )
+{
+   return Global::GetDicts()->NewVirtualDictEntry(group,elem,vr,vm,name);
+}
+
+//-----------------------------------------------------------------------------
+// Protected
 /**
  * \brief   Searches [both] the public [and the shadow dictionary (when they
  *          exist)] for the presence of the DictEntry with given
@@ -539,7 +541,6 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group,uint16_t elem)
    return found;
 }
 
-
 /**
  * \brief   Searches [both] the public [and the shadow dictionary (when they
  *          exist)] for the presence of the DictEntry with given
@@ -550,7 +551,7 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group,uint16_t elem)
  * @return  Corresponding DictEntry when it exists, NULL otherwise.
  */
 DictEntry *DocEntrySet::GetDictEntry(uint16_t group, uint16_t elem,
-                                             TagName const & vr)
+                                     TagName const &vr)
 {
    DictEntry *dictEntry = GetDictEntry(group,elem);
    DictEntry *goodEntry = dictEntry;
@@ -586,5 +587,8 @@ DictEntry *DocEntrySet::GetDictEntry(uint16_t group, uint16_t elem,
 //-----------------------------------------------------------------------------
 // Private
 
+//-----------------------------------------------------------------------------
+// Print
+
 //-----------------------------------------------------------------------------
 } // end namespace gdcm