Exemplo n.º 1
0
 // static Random random;
 public AblCodeGenerator(StoryData story)
 {
     // random = new Random();
     _typeIdToTraitsRels = new Hashtable(); //maps entity type id's to HashSet<String> => name mappings for traits
     _story = story;
     _goalNames = new Hashtable();
     _plotPointTypeNames = new Hashtable();
     _interactivityDaemonNames = new List<string>();
     _tw = new IndentingWriter();
 }
Exemplo n.º 2
0
        public static void writeToFile(IndentingWriter contents, string path)
        {
            try
            {
                // create a writer and open the file
                TextWriter tw = new StreamWriter(path);

                // write a line of text to the file
                tw.Write(contents.ToString());

                // close the stream
                tw.Close();
            }
            catch (Exception e)
            {
                throw new Exception("Error writing generated ABL code: " + e.Message);
            }
        }
Exemplo n.º 3
0
        public static void writeToFile(IndentingWriter contents, string path)
        {
            try
            {
                // create a writer and open the file
                TextWriter tw = new StreamWriter(path);

                // write a line of text to the file
                tw.Write(contents.ToString());

                // close the stream
                tw.Close();
            }
            catch (Exception e)
            {
                throw new Exception("Error writing generated ABL code: " + e.Message);
            }
        }