GDCM 3.0.24
gdcmPDataTFPDU.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 GDCMPDATATFPDU_H
15#define GDCMPDATATFPDU_H
16
17#include "gdcmTypes.h"
19#include "gdcmBasePDU.h"
20#include <limits>
21
22namespace gdcm
23{
24
25namespace network
26{
27
34{
35public:
37 std::istream &Read(std::istream &is) override;
38 const std::ostream &Write(std::ostream &os) const override;
39
41 size_t Size() const override;
42
44 V.push_back( pdv );
45 assert(Size() < std::numeric_limits<uint32_t>::max());
46 ItemLength = (uint32_t)Size() - 6;
47 }
48
49 typedef std::vector<PresentationDataValue>::size_type SizeType;
51 assert( !V.empty() && i < V.size() );
52 return V[i];
53 }
55 return V.size();
56 }
57
58 void Print(std::ostream &os) const override;
59 bool IsLastFragment() const override;
60
61protected:
62 std::istream &ReadInto(std::istream &is, std::ostream &os);
63private:
64 static const uint8_t ItemType; // PDUType ?
65 static const uint8_t Reserved2;
66 uint32_t ItemLength; // PDU Length ?
67 std::vector<PresentationDataValue> V;
68};
69
70} // end namespace network
71
72} // end namespace gdcm
73
74#endif //GDCMPDATATFPDU_H
BasePDU.
Definition gdcmBasePDU.h:51
PDataTFPDU.
Definition gdcmPDataTFPDU.h:34
void Print(std::ostream &os) const override
SizeType GetNumberOfPresentationDataValues() const
Definition gdcmPDataTFPDU.h:54
std::vector< PresentationDataValue >::size_type SizeType
Definition gdcmPDataTFPDU.h:49
size_t Size() const override
bool IsLastFragment() const override
std::istream & ReadInto(std::istream &is, std::ostream &os)
void AddPresentationDataValue(PresentationDataValue const &pdv)
Definition gdcmPDataTFPDU.h:43
std::istream & Read(std::istream &is) override
PresentationDataValue const & GetPresentationDataValue(SizeType i) const
Definition gdcmPDataTFPDU.h:50
const std::ostream & Write(std::ostream &os) const override
PresentationDataValue.
Definition gdcmPresentationDataValue.h:33
#define GDCM_EXPORT
Definition gdcmWin32.h:34
Definition gdcmASN1.h:21