+//-----------------------------------------------------------------------------
+gdcmDictSet *gdcmGlobal::Dicts = (gdcmDictSet *)0;
+gdcmVR *gdcmGlobal::VR = (gdcmVR *)0;
+gdcmTS *gdcmGlobal::TS = (gdcmTS *)0;
+gdcmDicomDirElement *gdcmGlobal::ddElem = (gdcmDicomDirElement *)0;
+gdcmGlobal gdcmGlob;
+
+gdcmGlobal::gdcmGlobal(void) {
+ if (VR || TS || Dicts)
+ dbg.Verbose(0, "gdcmGlobal::gdcmGlobal : VR or TS or Dicts already allocated");
+ Dicts = new gdcmDictSet();
+ VR = new gdcmVR();
+ TS = new gdcmTS();
+ ddElem = new gdcmDicomDirElement();
+}
+
+gdcmGlobal::~gdcmGlobal() {
+ delete Dicts;
+ delete VR;
+ delete TS;
+ delete ddElem;
+}
+
+gdcmVR *gdcmGlobal::GetVR(void) {
+ return VR;
+}
+
+gdcmTS *gdcmGlobal::GetTS(void) {
+ return TS;
+}
+
+gdcmDictSet *gdcmGlobal::GetDicts(void) {
+ return Dicts;
+}
+
+gdcmDicomDirElement *gdcmGlobal::GetDicomDirElements(void) {
+ return ddElem;
+}
+
+//-----------------------------------------------------------------------------
+// Because is not yet available in g++2.96
+std::istream& eatwhite(std::istream& is) {
+ char c;
+ while (is.get(c)) {
+ if (!isspace(c)) {
+ is.putback(c);
+ break;
+ }
+ }
+ return is;
+}