ParseHelpers.hh
Go to the documentation of this file.
1 //
2 // Copyright (c) 2020 Fraunhofer Institute for Applied Information Technology (FIT)
3 // Network Research Group (NET)
4 // Schloss Birlinghoven, 53754 Sankt Augustin, GERMANY
5 // Contact: support@wiback.org
6 //
7 // This file is part of the SENF code tree.
8 // It is licensed under the 3-clause BSD License (aka New BSD License).
9 // See LICENSE.txt in the top level directory for details or visit
10 // https://opensource.org/licenses/BSD-3-Clause
11 //
12 
13 
17 #ifndef HH_SENF_Packets_ParseHelpers_
18 #define HH_SENF_Packets_ParseHelpers_ 1
19 
20 #ifndef HH_SENF_Packets_Packets_
21 #error "Don't include 'ParseHelpers.hh' directly, include 'Packets.hh'"
22 #endif
23 
24 // Custom includes
25 
26 //#include "ParseHelpers.mpp"
27 #include "ParseHelpers.ih"
28 //-/////////////////////////////////////////////////////////////////////////////////////////////////
29 
272 //\{
274 
276 //\{
277 
293 #define SENF_FIXED_PARSER() SENF_ABSOLUTE_INCLUDE_PATH(Packets/parse_fixed_setup.hh)
294 
310 #define SENF_PARSER() SENF_ABSOLUTE_INCLUDE_PATH(Packets/parse_setup.hh)
311 
331 #define SENF_PARSER_INIT() void init(int) const
332 
333 #ifdef DOXYGEN
334 
354 #define SENF_PARSER_INHERIT(base)
355 
378 #define SENF_PARSER_FINALIZE(name)
379 
380 //\}
381 
383 //\{
384 
418 #define SENF_PARSER_FIELD(name, type)
419 
433 #define SENF_PARSER_FIELD_RO(name, type)
434 
443 #define SENF_PARSER_PRIVATE_FIELD(name, type)
444 
474 #define SENF_PARSER_CUSTOM_FIELD(name, type, size)
475 
476 //\}
477 
479 //\{
480 
506 #define SENF_PARSER_BITFIELD(name, bits, type)
507 
515 #define SENF_PARSER_BITFIELD_RO(name, bits, type)
516 
525 #define SENF_PARSER_PRIVATE_BITFIELD(name, bits, type)
526 
527 //\}
528 
530 //\{
531 
551 #define SENF_PARSER_SKIP(skip)
552 
561 #define SENF_PARSER_SKIP_BITS(bits)
562 
577 #define SENF_PARSER_GOTO(name)
578 
595 #define SENF_PARSER_GOTO_OFFSET(offset)
596 
610 #define SENF_PARSER_LABEL(name)
611 
623 #define SENF_PARSER_OFFSET(name)
624 
639 #define SENF_PARSER_FIXED_OFFSET(name)
640 
654 #define SENF_PARSER_CURRENT_FIXED_OFFSET()
655 
656 //\}
657 
658 #else
659 
660 #define SENF_PARSER_INHERIT BOOST_PP_CAT( SENF_PARSER_INHERIT_, SENF_PARSER_TYPE )
661 
662 #define SENF_PARSER_FIELD BOOST_PP_CAT( SENF_PARSER_FIELD_, SENF_PARSER_TYPE )
663 #define SENF_PARSER_FIELD_RO BOOST_PP_CAT( SENF_PARSER_FIELD_RO_, SENF_PARSER_TYPE )
664 #define SENF_PARSER_BITFIELD BOOST_PP_CAT( SENF_PARSER_BITFIELD_, SENF_PARSER_TYPE )
665 #define SENF_PARSER_BITFIELD_RO BOOST_PP_CAT( SENF_PARSER_BITFIELD_RO_, SENF_PARSER_TYPE )
666 #define SENF_PARSER_CUSTOM_FIELD BOOST_PP_CAT( SENF_PARSER_CUSTOM_FIELD_, SENF_PARSER_TYPE )
667 
668 #define SENF_PARSER_PRIVATE_FIELD BOOST_PP_CAT( SENF_PARSER_P_FIELD_, SENF_PARSER_TYPE )
669 #define SENF_PARSER_PRIVATE_BITFIELD BOOST_PP_CAT( SENF_PARSER_P_BITFIELD_, SENF_PARSER_TYPE )
670 
671 #define SENF_PARSER_SKIP BOOST_PP_CAT( SENF_PARSER_SKIP_, SENF_PARSER_TYPE )
672 #define SENF_PARSER_SKIP_BITS BOOST_PP_CAT( SENF_PARSER_SKIP_BITS_, SENF_PARSER_TYPE )
673 #define SENF_PARSER_GOTO BOOST_PP_CAT( SENF_PARSER_GOTO_, SENF_PARSER_TYPE )
674 #define SENF_PARSER_GOTO_OFFSET BOOST_PP_CAT( SENF_PARSER_GOTO_OFFSET_, SENF_PARSER_TYPE )
675 #define SENF_PARSER_LABEL BOOST_PP_CAT( SENF_PARSER_LABEL_, SENF_PARSER_TYPE )
676 
677 #define SENF_PARSER_OFFSET BOOST_PP_CAT( SENF_PARSER_OFFSET_, SENF_PARSER_TYPE )
678 #define SENF_PARSER_FIXED_OFFSET BOOST_PP_CAT( SENF_PARSER_FIXED_OFFSET_, SENF_PARSER_TYPE )
679 #define SENF_PARSER_CURRENT_FIXED_OFFSET BOOST_PP_CAT( SENF_PARSER_CURRENT_FIXED_OFFSET_, SENF_PARSER_TYPE )
680 
681 #define SENF_PARSER_FINALIZE BOOST_PP_CAT( SENF_PARSER_FINALIZE_, SENF_PARSER_TYPE )
682 
683 #endif
684 
685 //\}
686 
687 //-/////////////////////////////////////////////////////////////////////////////////////////////////
688 #endif
689 #if !defined(HH_SENF_Packets_Packets__decls_) && !defined(HH_SENF_Packets_ParseHelpers_i_)
690 #define HH_SENF_Packets_ParseHelpers_i_
691 //#include "ParseHelpers.cci"
692 //#include "ParseHelpers.ct"
693 //#include "ParseHelpers.cti"
694 #endif
695 
696 
697 // Local Variables:
698 // mode: c++
699 // fill-column: 100
700 // comment-column: 40
701 // c-file-style: "senf"
702 // indent-tabs-mode: nil
703 // ispell-local-dictionary: "american"
704 // compile-command: "scons -u test"
705 // End: