Merged revisions 262,264-265,267-282,284-298,300-311 via svnmerge from
[senf.git] / Packets / PacketTypes.hh
1 // Copyright (C) 2007 
2 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
3 // Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
4 //     Stefan Bund <g0dil@berlios.de>
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 2 of the License, or
9 // (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the
18 // Free Software Foundation, Inc.,
19 // 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20
21 /** \file
22     \brief PacketTypes public header */
23
24 #ifndef HH_PacketTypes_
25 #define HH_PacketTypes_ 1
26
27 // Custom includes
28 #include <vector>
29 #include <boost/intrusive_ptr.hpp>
30 #include <boost/cstdint.hpp>
31 #include <boost/intrusive/ilist.hpp>
32 #include <boost/intrusive/ilist_hook.hpp>
33
34 //#include "PacketTypes.mpp"
35 ///////////////////////////////hh.p////////////////////////////////////////
36
37 namespace senf {
38
39     class PacketData;
40     class PacketInterpreterBase;
41
42 namespace detail {
43
44     class PacketImpl;
45
46 namespace packet {
47
48     template <class T>
49     struct smart_pointer {
50         typedef boost::intrusive_ptr<T> ptr_t;
51     };
52     
53     struct interpreter_list_tag;
54     typedef boost::intrusive::ilist_base_hook<interpreter_list_tag> interpreter_list_base;
55     typedef interpreter_list_base::value_traits<PacketInterpreterBase> interpreter_list_type;
56
57     typedef boost::intrusive::ilist<interpreter_list_type,false> interpreter_list;
58
59     typedef boost::uint8_t byte;
60     typedef std::vector<byte> raw_container;
61     typedef raw_container::size_type size_type;
62     typedef raw_container::difference_type difference_type;
63     
64     typedef raw_container::iterator iterator;
65     typedef raw_container::const_iterator const_iterator;
66     typedef long refcount_t; // This is long since boost uses long for refcounts .. hmm ..
67
68 namespace test {
69
70     class TestDriver;
71
72 }}}}
73
74 ///////////////////////////////hh.e////////////////////////////////////////
75 //#include "PacketTypes.cci"
76 //#include "PacketTypes.ct"
77 //#include "PacketTypes.cti"
78 #endif
79
80 \f
81 // Local Variables:
82 // mode: c++
83 // fill-column: 100
84 // c-file-style: "senf"
85 // indent-tabs-mode: nil
86 // ispell-local-dictionary: "american"
87 // End: