コード例 #1
0
ファイル: generator.py プロジェクト: Mocahteam/SpringPP
  def __init__(self, templatedir, springdir, outputdir, options=()):
    self.templatedir=templatedir
    self.springdir=springdir
    self.outputdir=outputdir
    
    files = [CALLBACKFILE, EVENTFILE, COMMANDFILE]
    for i, f in enumerate(files):
      files[i]=os.path.join(springdir,f)

    self.clbfuncs, plainfuncs = getcallback_functions(files[0])
    self.classes= buildclasses(plainfuncs)
    self.events = getevents(files[1])
    self.commands = getcommands(files[2])
    self.command_types = parse_enums(files[2])
    self.event_types = parse_enums(files[1])
    self.commandfuncs = commandfuncs(self.commands)
    
    
    self.options = set(options)
コード例 #2
0
ファイル: generator.py プロジェクト: acccounttest/Python
  def __init__(self, templatedir, springdir, outputdir, options=()):
	self.templatedir=templatedir
	self.springdir=springdir
	self.outputdir=outputdir
	global CALLBACKFILE, EVENTFILE, COMMANDFILE
	CALLBACKFILE = makeabspath(springdir, CALLBACKFILE)
	EVENTFILE = makeabspath(springdir, EVENTFILE)
	COMMANDFILE = makeabspath(springdir, COMMANDFILE)

	self.clbfuncs, plainfuncs = callback_parser.getcallback_functions(CALLBACKFILE)
	self.classes= buildclasses(plainfuncs)
	self.events = event_parser.getevents(EVENTFILE)
	self.commands = event_parser.getcommands(COMMANDFILE)
	self.command_types = event_parser.parse_enums(COMMANDFILE)
	self.event_types = event_parser.parse_enums(EVENTFILE)
	self.commandfuncs = commandfuncs(self.commands)


	self.options = set(options)
コード例 #3
0
    def __init__(self, templatedir, springdir, outputdir, options=()):
        self.templatedir = templatedir
        self.springdir = springdir
        self.outputdir = outputdir
        global CALLBACKFILE, EVENTFILE, COMMANDFILE
        CALLBACKFILE = makeabspath(springdir, CALLBACKFILE)
        EVENTFILE = makeabspath(springdir, EVENTFILE)
        COMMANDFILE = makeabspath(springdir, COMMANDFILE)

        self.clbfuncs, plainfuncs = callback_parser.getcallback_functions(
            CALLBACKFILE)
        self.classes = buildclasses(plainfuncs)
        self.events = event_parser.getevents(EVENTFILE)
        self.commands = event_parser.getcommands(COMMANDFILE)
        self.command_types = event_parser.parse_enums(COMMANDFILE)
        self.event_types = event_parser.parse_enums(EVENTFILE)
        self.commandfuncs = commandfuncs(self.commands)

        self.options = set(options)