gdcmPreamble.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __gdcmPreamble_h
00017 #define __gdcmPreamble_h
00018
00019 #include "gdcmTypes.h"
00020 #include "gdcmVL.h"
00021
00022 namespace gdcm
00023 {
00024
00028 class GDCM_EXPORT Preamble
00029 {
00030 public:
00031 Preamble();
00032 ~Preamble();
00033
00034 friend std::ostream &operator<<(std::ostream &_os, const Preamble &_val);
00035
00036
00037 void Clear();
00038
00039
00040 void Valid();
00041 void Create();
00042 void Remove();
00043
00044
00045 std::istream &Read(std::istream &is);
00046
00047
00048 std::ostream const &Write(std::ostream &os) const;
00049
00050 void Print(std::ostream &os) const;
00051
00052 const char *GetInternal() const { return Internal; }
00053
00054 bool IsEmpty() const { return !Internal; }
00055
00056 VL GetLength() const { return 128 + 4; }
00057
00058 Preamble(Preamble const &preamble)
00059 {
00060 (void)preamble;
00061 }
00062 protected:
00063
00064 bool IsValid() const {
00065
00066 return true;
00067 }
00068
00069
00070 private:
00071 char *Internal;
00072 };
00073
00074 inline std::ostream& operator<<(std::ostream &os, const Preamble &val)
00075 {
00076 os << val.Internal;
00077 return os;
00078 }
00079
00080
00081 }
00082
00083 #endif //__gdcmPreamble_h
00084