GDCM 2.2.1

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

- File List
- File Members

gdcmTransferSyntaxSub.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 GDCMTRANSFERSYNTAXSUB_H
15 #define GDCMTRANSFERSYNTAXSUB_H
16
17 #include "gdcmTypes.h"
18 #include "gdcmTransferSyntax.h"
19 #include "gdcmUIDs.h"
20
21 namespace gdcm
22 {
23
24 namespace network
25 {
26
37 class TransferSyntaxSub
38 {
39 public:
40 TransferSyntaxSub();
41 void SetName( const char *name );
42 const char *GetName() const { return Name.c_str(); }
43
44 // accept a UIDs::TSType also...
45 void SetNameFromUID( UIDs::TSName tsname );
46
47 std::istream &Read(std::istream &is);
48 const std::ostream &Write(std::ostream &os) const;
49 size_t Size() const;
50 void Print(std::ostream &os) const;
51
52 bool operator==(const TransferSyntaxSub & ts) const
53 {
54 return Name == ts.Name;
55 }
56
57 private:
58 void UpdateName( const char *name );
59 static const uint8_t ItemType;
60 static const uint8_t Reserved2;
61 uint16_t ItemLength; // len of
62 std::string /*TransferSyntaxSub*/ Name; // UID
63 };
64
65 } // end namespace network
66
67 } // end namespace gdcm
68
69 #endif //GDCMTRANSFERSYNTAXSUB_H