Assimp  v3.1.1 (June 2014)
structsgen Namespace Reference

Functions

def GetType (type, prefix='c_')
 
def restructure (match)
 
def Structify (fileName)
 

Variables

 complex
 
 file = open('structs.py', 'w')
 
 files = os.listdir (path)
 
string path = '../../../include/assimp'
 
 primitive
 
 REdefine
 
 REdesc
 
 RErestruc
 
 RErmifdef
 
 RErpcom
 
 REstructs
 
tuple skiplist = ("FileIO", "File", "locateFromAssimpHeap",'LogStream','MeshAnim','AnimMesh')
 
 sr
 
 struct
 
string structs1 = ""
 
string structs2 = ""
 
string structs3 = ""
 
string structs4 = ""
 
string template
 
string templateSR
 
string text = "#-*- coding: UTF-8 -*-\n\n"
 

Function Documentation

§ GetType()

def structsgen.GetType (   type,
  prefix = 'c_' 
)

§ restructure()

def structsgen.restructure (   match)

§ Structify()

def structsgen.Structify (   fileName)

Variable Documentation

§ complex

structsgen.complex

§ file

structsgen.file = open('structs.py', 'w')

§ files

structsgen.files = os.listdir (path)

§ path

string structsgen.path = '../../../include/assimp'

§ primitive

structsgen.primitive

§ REdefine

structsgen.REdefine
Initial value:
1 = re.compile(r''
2  r'(?P<desc>)' # /** *desc */
3  r'#\s*define\s(?P<name>[^(\n]+?)\s(?P<code>.+)$' # #define name value
4  , re.MULTILINE)

§ REdesc

structsgen.REdesc
Initial value:
1 = re.compile(r''
2  r'^\s*?([*]|/\*\*)(?P<line>.*?)' # * line
3  , re.IGNORECASE + re.DOTALL + re.MULTILINE)

§ RErestruc

structsgen.RErestruc
Initial value:
1 = re.compile(r''
2  r'(?P<struct>C_STRUCT\s|C_ENUM\s|)' # [C_STRUCT]
3  r'(?P<type>\w+\s?\w+?[*]*)\s' # type
4  #r'(?P<name>\w+)' # name
5  r'(?P<name>\w+|[a-z0-9_, ]+)' # name
6  r'(:?\[(?P<index>\w+)\])?;' # []; (optional)
7  , re.DOTALL)

§ RErmifdef

structsgen.RErmifdef
Initial value:
1 = re.compile(r''
2  r'#ifdef __cplusplus' # #ifdef __cplusplus
3  r'(?P<code>.*)' # code
4  r'#endif(\s*//\s*!?\s*__cplusplus)*' # #endif
5  , re.IGNORECASE + re.DOTALL)

§ RErpcom

structsgen.RErpcom
Initial value:
1 = re.compile(r''
2  r'\s*(/\*+\s|\*+/|\B\*\s|///?!?)' # /**
3  r'(?P<line>.*?)' # * line
4  , re.IGNORECASE + re.DOTALL)

§ REstructs

structsgen.REstructs
Initial value:
1 = re.compile(r''
2  #r'//\s?[\-]*\s(?P<desc>.*?)\*/\s' # /** *desc */
3  #r'//\s?[\-]*(?P<desc>.*?)\*/(?:.*?)' # garbage
4  r'//\s?[\-]*\s(?P<desc>.*?)\*/\W*?' # /** *desc */
5  r'struct\s(?:ASSIMP_API\s)?(?P<name>[a-z][a-z0-9_]\w+\b)' # struct name
6  r'[^{]*?\{' # {
7  r'(?P<code>.*?)' # code
8  r'\}\s*(PACK_STRUCT)?;' # };
9  , re.IGNORECASE + re.DOTALL + re.MULTILINE)

§ skiplist

tuple structsgen.skiplist = ("FileIO", "File", "locateFromAssimpHeap",'LogStream','MeshAnim','AnimMesh')

§ sr

structsgen.sr

§ struct

structsgen.struct

§ structs1

string structsgen.structs1 = ""

§ structs2

string structsgen.structs2 = ""

§ structs3

string structsgen.structs3 = ""

§ structs4

string structsgen.structs4 = ""

§ template

string structsgen.template
Initial value:
1 = """
2 class $NAME$(Structure):
3  \"\"\"
4 $DESCRIPTION$
5  \"\"\"
6 $DEFINES$
7  _fields_ = [
8  $FIELDS$
9  ]
10 """

§ templateSR

string structsgen.templateSR
Initial value:
1 = """
2 class $NAME$(Structure):
3  \"\"\"
4 $DESCRIPTION$
5  \"\"\"
6 $DEFINES$
7 
8 $NAME$._fields_ = [
9  $FIELDS$
10  ]
11 """

§ text

string structsgen.text = "#-*- coding: UTF-8 -*-\n\n"