Odil
A C++11 library for the DICOM standard
Object.h
Go to the documentation of this file.
1 /*************************************************************************
2  * odil - Copyright (C) Universite de Strasbourg
3  * Distributed under the terms of the CeCILL-B license, as published by
4  * the CEA-CNRS-INRIA. Refer to the LICENSE file or to
5  * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
6  * for details.
7  ************************************************************************/
8 
9 #ifndef _da2270e3_d393_415a_9c5c_6253152ed9da
10 #define _da2270e3_d393_415a_9c5c_6253152ed9da
11 
12 #include <ostream>
13 
14 #include "odil/odil.h"
15 #include "odil/pdu/Item.h"
16 
17 namespace odil
18 {
19 
20 namespace pdu
21 {
22 
28 {
29 public:
31  virtual ~Object();
32 
34  Item const & get_item() const;
35 
36 protected:
38 
40  uint32_t _compute_length() const;
41 
43  uint32_t _compute_length(Item const & item) const;
44 
46  uint32_t _compute_length(Item::Field const & field) const;
47 };
48 
51 std::ostream &
52 operator<<(std::ostream & stream, Object const & object);
53 
54 }
55 
56 }
57 
58 #endif // _da2270e3_d393_415a_9c5c_6253152ed9da
odil::pdu::Object::~Object
virtual ~Object()
Destructor, makes the type polymorphic.
odil::pdu::Object::_compute_length
uint32_t _compute_length() const
Compute the value of the length field of the object.
odil::pdu::Object
Base class for all PDU-related high-level objects (PDU, items and sub-items).
Definition: Object.h:28
Item.h
odil
Definition: Association.h:25
ODIL_API
#define ODIL_API
Definition: odil.h:28
odil::pdu::Item::Field
Generic field.
Definition: Item.h:33
odil.h
odil::pdu::Object::_compute_length
uint32_t _compute_length(Item::Field const &field) const
Compute the full size of a field.
odil::pdu::Object::_compute_length
uint32_t _compute_length(Item const &item) const
Compute the full size of an item.
odil::pdu::Object::get_item
Item const & get_item() const
Get the underlying item.
odil::pdu::Object::_item
Item _item
Definition: Object.h:37
odil::pdu::operator<<
std::ostream & operator<<(std::ostream &stream, Item const &item)
odil::pdu::Item
A sequence of fields forming a full PDU or a part of it.
Definition: Item.h:29