GDCM
2.2.0
|
00001 /*========================================================================= 00002 00003 Program: GDCM (Grassroots DICOM). A DICOM library 00004 00005 Copyright (c) 2006-2011 Mathieu Malaterre 00006 All rights reserved. 00007 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details. 00008 00009 This software is distributed WITHOUT ANY WARRANTY; without even 00010 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00011 PURPOSE. See the above copyright notice for more information. 00012 00013 =========================================================================*/ 00014 #ifndef GDCMAPPLICATIONCONTEXT_H 00015 #define GDCMAPPLICATIONCONTEXT_H 00016 00017 #include "gdcmTypes.h" 00018 00019 namespace gdcm 00020 { 00021 00022 namespace network 00023 { 00024 00032 class ApplicationContext 00033 { 00034 public: 00035 ApplicationContext(); 00036 std::istream &Read(std::istream &is); 00037 const std::ostream &Write(std::ostream &os) const; 00038 00039 void SetName( const char *name ) { UpdateName( name ); } 00040 const char *GetName() const { return Name.c_str(); } 00041 size_t Size() const; 00042 00043 //static const uint8_t GetItemType() { return ItemType; } 00044 void Print(std::ostream &os) const; 00045 00046 private: 00047 void UpdateName( const char *name ); 00048 static const uint8_t ItemType; 00049 static const uint8_t Reserved2; 00050 uint16_t ItemLength; // len of application context name 00051 std::string /*ApplicationContext*/ Name; // UID 00052 }; 00053 00054 } // end namespace network 00055 00056 } // end namespace gdcm 00057 00058 #endif //GDCMAPPLICATIONCONTEXT_H