This file is part of the <ext/Preprocessor> library API, and can be directly included by user programs.
ext/ preprocessor/ struct.bi | This file is part of the <ext/Preprocessor> library API, and can be directly included by user programs. |
License | Copyright © 2009, FreeBASIC Extended Library Development Group Copyright © 2002, Paul Mensonides |
Macros | |
fbextPP_Struct | defines a new preprocessor struct sname_ with members mdecls_. |
fbextPP_StructNew | expands to an instance of the struct sname_. |
fbextPP_StructMember | expands to the value of the member member_ of the struct struct_. |
fbextPP_StructSetMember | expands to a copy of a struct struct_ with member member_ set to value_. |
fbextPP_StructSetMembers |
Copyright © 2009, FreeBASIC Extended Library Development Group Copyright © 2002, Paul Mensonides
Distributed under the Boost Software License, Version 1.0. See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Distributed under the FreeBASIC Extended Library Group license. See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License
expands to an instance of the struct sname_. The instance members are initialized with the initializers in minits, if any. Note that minits_ must have (:) as the first element.
sname_ | is the name of the struct created with fbextPP_Struct. |
minits_ | is a sequence of two-element tuples representing member initializers, and has the form, (member, initvalue) |
defines a new preprocessor struct sname_ with members mdecls_.
# macro fbextPP_Struct( sname_, mdecls_ )
expands to the value of the member member_ of the struct struct_.
# define fbextPP_StructMember( struct_, member_ ) _fbextPP_StructMember_aux(fbextPP_TupleRemParens(2, struct_), member_)
expands to a copy of a struct struct_ with member member_ set to value_.
# define fbextPP_StructSetMember( struct_, member_, value_ ) _fbextPP_StructSetMember_aux(fbextPP_TupleRemParens(2, struct_), member_, value_)
# define fbextPP_StructSetMembers( struct_, memvalues_ ) fbextPP_SeqFoldLeft(_fbextPP_StructSetMembers_O, struct_, memvalues_)