]> Creatis software - gdcm.git/blob - src/gdcmValEntry.h
05ae4f188256b9667f31593f79bbc69741c42d70
[gdcm.git] / src / gdcmValEntry.h
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: gdcmValEntry.h,v $
5   Language:  C++
6   Date:      $Date: 2005/01/25 15:21:20 $
7   Version:   $Revision: 1.38 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18
19 #ifndef GDCMVALENTRY_H
20 #define GDCMVALENTRY_H
21
22 #include "gdcmDocEntry.h"
23 #include "gdcmContentEntry.h"
24
25 #include <iostream>
26
27 namespace gdcm 
28 {
29 //-----------------------------------------------------------------------------
30
31 /**
32  * \brief   Any Dicom Document (File or DicomDir) contains 
33  *           a set of DocEntry  - Dicom entries -
34  *          ValEntry is an elementary DocEntry (i.e. a ContentEntry, 
35  *           as opposed to SeqEntry)
36  *          whose content is 'std::string representable' : characters,
37  *          or integers (loaded in memory as a std::string)
38  *          ValEntry is a specialisation of ContentEntry
39  */ 
40  
41 class GDCM_EXPORT ValEntry  : public ContentEntry
42 {
43 public:
44
45    // Contructors and Destructor are public.
46    ValEntry(DictEntry *e);
47    ValEntry(DocEntry *d); 
48
49    ~ValEntry();
50
51    // Other accessors are inherited from gdcm::ContentEntry
52
53    void Print(std::ostream &os = std::cout, 
54               std::string const & indent = ""); 
55
56    void WriteContent(std::ofstream *fp, FileType filetype); 
57    
58    /// Sets the value (string) of the current Dicom entry.
59    /// The size is updated
60    void SetValue(std::string const &val);
61
62 protected:
63    
64 private:
65
66 };
67
68 } // end namespace gdcm
69
70 //-----------------------------------------------------------------------------
71 #endif
72