Exemplo n.º 1
0
        public void ImplementedParserTest()
        {
            TCODParserCallbackStruct callback = new TCODParserCallbackStruct(new NewStructureCallback(NewStructCallbackTest), new NewFlagCallback(NewFlagCallbackTest),
                                                                             new NewPropertyCallback(NewPropertyCallbackTest), new EndStructureCallback(EndStructCallbackTest),
                                                                             new ErrorCallback(ErrorCallbackTest));

            using (TCODFileParser parser = new TCODFileParser())
            {
                AddParserTestStructs(parser);
                parser.Run("exampleConfig.txt", ref callback);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Run the parser with custom callbacks
 /// </summary>
 /// <param name="filename">Filename of configuration file</param>
 /// <param name="listener">Callbacks from parser</param>
 public void Run(string filename, ref TCODParserCallbackStruct listener)
 {
     TCOD_parser_run(m_fileParser, new StringBuilder(filename), ref listener.nativeCallback);
 }
Exemplo n.º 3
0
 private extern static void TCOD_parser_run(IntPtr parser, StringBuilder filename, ref TCODParserCallbackStruct.TCODParserNativeCallback listener);
Exemplo n.º 4
0
 /// <summary>
 /// Run the parser with custom callbacks
 /// </summary>
 /// <param name="filename">Filename of configuration file</param>
 /// <param name="listener">Callbacks from parser</param>
 public void Run(string filename, ref TCODParserCallbackStruct listener)
 {
     TCOD_parser_run(m_fileParser, new StringBuilder(filename), ref listener.nativeCallback);
 }