GDCM 2.2.1

- Main Page
- Related Pages
- Namespaces
- Classes
- Files
- Examples

- File List
- File Members

gdcmApplicationContext.h
Go to the documentation of this file.
1 /*=========================================================================
2
3 Program: GDCM (Grassroots DICOM). A DICOM library
4
5 Copyright (c) 2006-2011 Mathieu Malaterre
6 All rights reserved.
7 See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the above copyright notice for more information.
12
13 =========================================================================*/
14 #ifndef GDCMAPPLICATIONCONTEXT_H
15 #define GDCMAPPLICATIONCONTEXT_H
16
17 #include "gdcmTypes.h"
18
19 namespace gdcm
20 {
21
22 namespace network
23 {
24
32 class ApplicationContext
33 {
34 public:
35 ApplicationContext();
36 std::istream &Read(std::istream &is);
37 const std::ostream &Write(std::ostream &os) const;
38
39 void SetName( const char *name ) { UpdateName( name ); }
40 const char *GetName() const { return Name.c_str(); }
41 size_t Size() const;
42
43 //static const uint8_t GetItemType() { return ItemType; }
44 void Print(std::ostream &os) const;
45
46 private:
47 void UpdateName( const char *name );
48 static const uint8_t ItemType;
49 static const uint8_t Reserved2;
50 uint16_t ItemLength; // len of application context name
51 std::string /*ApplicationContext*/ Name; // UID
52 };
53
54 } // end namespace network
55
56 } // end namespace gdcm
57
58 #endif //GDCMAPPLICATIONCONTEXT_H