GDCM: gdcmTransferSyntaxSub.h Source File

GDCM 3.2.6

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
21namespace gdcm
22{
23
24namespace network
25{
26
37 class TransferSyntaxSub
38{
39public:
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
57private:
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
gdcm::UIDs::TSName
TSName
Definition gdcmUIDs.h:501
gdcm::network::TransferSyntaxSub::Write
const std::ostream & Write(std::ostream &os) const
gdcm::network::TransferSyntaxSub::Size
size_t Size() const
gdcm::network::TransferSyntaxSub::operator==
bool operator==(const TransferSyntaxSub &ts) const
Definition gdcmTransferSyntaxSub.h:52
gdcm::network::TransferSyntaxSub::Read
std::istream & Read(std::istream &is)
gdcm::network::TransferSyntaxSub::SetNameFromUID
void SetNameFromUID(UIDs::TSName tsname)
gdcm::network::TransferSyntaxSub::TransferSyntaxSub
TransferSyntaxSub()
gdcm::network::TransferSyntaxSub::GetName
const char * GetName() const
Definition gdcmTransferSyntaxSub.h:42
gdcm::network::TransferSyntaxSub::SetName
void SetName(const char *name)
gdcm::network::TransferSyntaxSub::Print
void Print(std::ostream &os) const
gdcmTransferSyntax.h
gdcmTypes.h
gdcmUIDs.h
gdcm::network
Definition gdcmAAbortPDU.h:24
gdcm
Definition gdcmASN1.h:21