GDCM  2.2.6
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 
22 namespace gdcm
23 {
24 
25 namespace network
26 {
27 
34 {
35 public:
36  PDataTFPDU();
37  std::istream &Read(std::istream &is);
38  const std::ostream &Write(std::ostream &os) const;
39 
41  size_t Size() const;
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;
59  bool IsLastFragment() const;
60 
61 protected:
62  std::istream &ReadInto(std::istream &is, std::ostream &os);
63 private:
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
std::vector< PresentationDataValue >::size_type SizeType
Definition: gdcmPDataTFPDU.h:49
void AddPresentationDataValue(PresentationDataValue const &pdv)
Definition: gdcmPDataTFPDU.h:43
#define GDCM_EXPORT
Definition: gdcmWin32.h:34
BasePDU base class for PDUs.
Definition: gdcmBasePDU.h:50
SizeType GetNumberOfPresentationDataValues() const
Definition: gdcmPDataTFPDU.h:54
PresentationDataValue Table 9-23 PRESENTATION-DATA-VALUE ITEM FIELDS.
Definition: gdcmPresentationDataValue.h:32
PresentationDataValue const & GetPresentationDataValue(SizeType i) const
Definition: gdcmPDataTFPDU.h:50
PDataTFPDU Table 9-22 P-DATA-TF PDU FIELDS.
Definition: gdcmPDataTFPDU.h:33

Generated on Sat Dec 21 2013 05:56:17 for GDCM by doxygen 1.8.5
SourceForge.net Logo