3 # Copyright (C) 2012 Intel Corporation
5 # Permission is hereby granted, free of charge, to any person obtaining a
6 # copy of this software and associated documentation files (the "Software"),
7 # to deal in the Software without restriction, including without limitation
8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 # and/or sell copies of the Software, and to permit persons to whom the
10 # Software is furnished to do so, subject to the following conditions:
12 # The above copyright notice and this permission notice (including the next
13 # paragraph) shall be included in all copies or substantial portions of the
16 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 # THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
32 #ifndef MARSHAL_GENERATABLE_H
33 #define MARSHAL_GENERATABLE_H
37 #endif /* MARSHAL_GENERATABLE_H */
41 class PrintCode(gl_XML
.gl_print_base
):
43 super(PrintCode
, self
).__init
__()
45 self
.name
= 'gl_marshal_h.py'
46 self
.license
= license
.bsd_license_template
% (
47 'Copyright (C) 2012 Intel Corporation', 'INTEL CORPORATION')
49 def printRealHeader(self
):
52 def printRealFooter(self
):
55 def printBody(self
, api
):
56 print 'enum marshal_dispatch_cmd_id'
58 for func
in api
.functionIterateAll():
59 flavor
= func
.marshal_flavor()
60 if flavor
in ('skip', 'sync'):
62 print ' DISPATCH_CMD_{0},'.format(func
.name
)
67 print 'Usage: %s [-f input_file_name]' % sys
.argv
[0]
71 if __name__
== '__main__':
72 file_name
= 'gl_API.xml'
75 (args
, trail
) = getopt
.getopt(sys
.argv
[1:], 'm:f:')
79 for (arg
,val
) in args
:
85 api
= gl_XML
.parse_GL_API(file_name
, marshal_XML
.marshal_item_factory())