Ejemplo n.º 1
0
# encoding: UTF-8

__author__ = 'CHENXY'

from string import join
from xtp_struct_quote import structDict
from xtp_struct_common import structDict as structDict2

structDict.update(structDict2)


#----------------------------------------------------------------------
def replaceTabs(f):
    """把Tab用4个空格替代"""
    l = []
    for line in f:
        line = line.replace('\t', '    ')
        l.append(line)
    return l


def processCallBack(line):
    orignalLine = line
    line = line.replace('    virtual void ', '')  # 删除行首的无效内容
    line = line.replace('{};\n', '')  # 删除行尾的无效内容

    content = line.split('(')
    cbName = content[0]  # 回调函数名称
    cbName = cbName.strip()

    cbArgs = content[1]  # 回调函数参数
Ejemplo n.º 2
0
# encoding: UTF-8

__author__ = 'CHENXY'

from string import join
from xtp_struct_quote import structDict
from xtp_struct_common import structDict as structDict2

structDict.update(structDict2)

#----------------------------------------------------------------------
def replaceTabs(f):
    """把Tab用4个空格替代"""
    l = []
    for line in f:
        line = line.replace('\t', '    ')
        l.append(line)
    return l


def processCallBack(line):
    orignalLine = line
    line = line.replace('    virtual void ', '')      # 删除行首的无效内容
    line = line.replace('{};\n', '')                # 删除行尾的无效内容

    content = line.split('(')
    cbName = content[0]                             # 回调函数名称
    cbName = cbName.strip()
    
    cbArgs = content[1]                             # 回调函数参数
    if cbArgs[-1] == ' ':