]> Creatis software - gdcm.git/commitdiff
Doxygenation
authorjpr <jpr>
Thu, 6 Jan 2005 17:08:05 +0000 (17:08 +0000)
committerjpr <jpr>
Thu, 6 Jan 2005 17:08:05 +0000 (17:08 +0000)
+ modif Coding style :
According with Benoit (and Doxygen) we shall use, just like anybody :
T *foo
or
T &foo
and NOT
T* foo
or
T & foo
(that was gdcm-special)

Dicts/dicomTS.dic
Doc/Website/CodingStyle.html
src/gdcmBase.cxx
src/gdcmDict.cxx

index b6f541c28b4d4f60d51a4201224dd398fab6d7ad..2e45fc787aba03e48303e470c20f15dc905148fb 100644 (file)
@@ -25,7 +25,7 @@
 1.2.840.10008.1.2.4.90   JPEG 2000 Image Compression (Lossless Only)
 1.2.840.10008.1.2.4.91   JPEG 2000 Image Compression
 1.2.840.10008.1.2.5      RLE Lossless
-1.2.840.113619.5.2       Implicit VR - Little Endian GE DLX xadc
+1.2.840.113619.5.2       Implicit VR - Big Endian (GE Private)
 
 1.2.840.10008.1.1                 Verification SOP Class
 1.2.840.10008.1.3.10              Media Storage Directory Storage
index 53910bb9ebeef6e3b39c46ede0de282d65d051c4..2b53165f6ae8297c6bf7494f031ee3f431839daf 100644 (file)
    logical blocks of code with the concerned comments.
  - Use parantheses around conditions e.g. with an if statement:
       if ( someLocalVariable == 2 ) { ... }
- - Add spaces around parantheses, or braces. Use
+ - Add spaces around parentheses, or braces. Use
       if ( someLocalVariable == 2 ) { ClassMenber += 1; }
    and not
       if (someLocalVariable == 2) {ClassMenber += 1;}
        *         dictionaries), look for the element value representation of
        *         a given tag.
        * @param  group Group number of the searched tag.
-       * @param  element Element number of the searched tag.
+       * @param  elem Element number of the searched tag.
        * @return Corresponding element value representation when it exists,
        *         and the string "gdcm::Unfound" otherwise.
        */
-      std::string Document::GetEntryByNumber(guint16 group, guint16 element)
+      std::string Document::GetEntryByNumber(guint16 group, guint16 elem)
       {
          ...
       }
          warnings won't work).
  - Don't use the C standard library. Don't include stdio.h, ctype.h...
    Don't use printf(), sprinf(), FILE*...
- - Don't use the NULL notation (either as macro, or as const int NULL=0).
+ - Don't use the NULL notation (neither as macro, nor as const int NULL=0).
    A pointer that doesn't refer to an object should simply be defined as
       DataPointer* MyDataPointer = 0;
                                                                                 
 * Basic types:
  - Assume T is a given type. When declaring or defining with the
    "pointer to T" notation, the * character must be adjacent to
-   the type and not the variable. That is use
+   the variable and not the type. That is use
+      T *foo = 0;
+   and not
       T* foo = 0;
+ - Assume T is a given type. When declaring or defining with the
+   "reference to T" notation, the & character must be adjacent to
+   the variable and not the type. That is use
+      T &foo = 0;
    and not
-      T *foo = 0;
+      T& foo = 0;
+   This is the common notation, not a 'gdcm special' notation.
+   (doxygen will not have any longer to correct)
+
  - Always define a typedef for a new type and be consistent in usage.
    Use
       typedef Header* HeaderPointer;
index 2d244cdf729277d6174590ce8ce5b777c685a38e..dafc627a43726dc4c0c622b6e643754802e41095 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmBase.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/12/21 15:16:07 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2005/01/06 17:08:06 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -45,7 +45,7 @@ Base::~Base()
  * \brief   Print all the object
  * @param   os The output stream to be written to.
  */
-void Base::Print(std::ostream &)
+void Base::Print(std::ostream & os)
 {
 }
 
index 19b9363999d81d478884c554acff33f6c60dc107..78c3f3f3c1a04f89c7b408c39c635f83ae1bd885 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: gdcmDict.cxx,v $
   Language:  C++
-  Date:      $Date: 2004/11/16 02:54:35 $
-  Version:   $Revision: 1.52 $
+  Date:      $Date: 2005/01/06 17:08:06 $
+  Version:   $Revision: 1.53 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -30,10 +30,10 @@ void FillDefaultDataDict(Dict *d);
 //-----------------------------------------------------------------------------
 // Constructor / Destructor
 /**
- * \brief   Construtor
+ * \brief   Constructor
  * @param   filename from which to build the dictionary.
  */
-Dict::Dict(std::string const & filename)
+Dict::Dict(std::string const &filename)
 {
    uint16_t group;
    uint16_t element;
@@ -123,7 +123,7 @@ void Dict::PrintByKey(std::ostream &os)
  *                           unpredictable result
  * @param   os The output stream to be written to.
  */
-void Dict::PrintByName(std::ostreamos)
+void Dict::PrintByName(std::ostream &os)
 {
    std::ostringstream s;
 
@@ -148,9 +148,9 @@ void Dict::PrintByName(std::ostream& os)
  * @param   newEntry entry to add 
  * @return  false if Dicom Element already exists
  */
-bool Dict::AddNewEntry(DictEntry const & newEntry) 
+bool Dict::AddNewEntry(DictEntry const &newEntry) 
 {
-   const TagKey & key = newEntry.GetKey();
+   const TagKey &key = newEntry.GetKey();
 
    if(KeyHt.count(key) == 1)
    {
@@ -171,7 +171,7 @@ bool Dict::AddNewEntry(DictEntry const & newEntry)
  * @param   newEntry new entry (overwrites any previous one with same tag)
  * @return  false if Dicom Element doesn't exist
  */
-bool Dict::ReplaceEntry(DictEntry const & newEntry)
+bool Dict::ReplaceEntry(DictEntry const &newEntry)
 {
    if ( RemoveEntry(newEntry.GetKey()) )
    {
@@ -189,7 +189,7 @@ bool Dict::ReplaceEntry(DictEntry const & newEntry)
  * @param   key (group|element)
  * @return  false if Dicom Dictionary Entry doesn't exist
  */
-bool Dict::RemoveEntry (TagKey const & key) 
+bool Dict::RemoveEntry (TagKey const &key) 
 {
    TagKeyHT::const_iterator it = KeyHt.find(key);
    if(it != KeyHt.end()) 
@@ -227,7 +227,7 @@ bool Dict::RemoveEntry (uint16_t group, uint16_t element)
  *            the name MAY CHANGE between two versions !
  * @return  the corresponding dictionnary entry when existing, NULL otherwise
  */
-DictEntry* Dict::GetDictEntryByName(TagName const & name)
+DictEntry *Dict::GetDictEntryByName(TagName const &name)
 {
    TagNameHT::iterator it = NameHt.find(name);
    if ( it == NameHt.end() )
@@ -243,7 +243,7 @@ DictEntry* Dict::GetDictEntryByName(TagName const & name)
  * @param   element element of the entry to be found
  * @return  the corresponding dictionnary entry when existing, NULL otherwise
  */
-DictEntryDict::GetDictEntryByNumber(uint16_t group, uint16_t element)
+DictEntry *Dict::GetDictEntryByNumber(uint16_t group, uint16_t element)
 {
    TagKey key = DictEntry::TranslateToKey(group, element);
    TagKeyHT::iterator it = KeyHt.find(key);
@@ -260,7 +260,7 @@ DictEntry* Dict::GetDictEntryByNumber(uint16_t group, uint16_t element)
  * \sa      DictSet::GetPubDictTagNamesByCategory
  * @return  A list of all entries of the public dicom dictionnary.
  */
-EntryNamesListDict::GetDictEntryNames() 
+EntryNamesList *Dict::GetDictEntryNames() 
 {
    EntryNamesList *result = new EntryNamesList;
    for (TagKeyHT::iterator tag = KeyHt.begin(); tag != KeyHt.end(); ++tag)