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 &)
00059 {
00060 Create();
00061 }
00062 Preamble& operator=(Preamble const &)
00063 {
00064 Create();
00065 return *this;
00066 }
00067 protected:
00068
00069 bool IsValid() const {
00070
00071 return true;
00072 }
00073
00074
00075 private:
00076 char *Internal;
00077 };
00078
00079 inline std::ostream& operator<<(std::ostream &os, const Preamble &val)
00080 {
00081 os << val.Internal;
00082 return os;
00083 }
00084
00085
00086 }
00087
00088 #endif //GDCMPREAMBLE_H
00089