예제 #1
0
	    public ItemEnumerator (ActionLog owner)
	    {
		this.owner = owner;

		saved_nextitem = owner.nextitem;
		Reset ();
	    }
예제 #2
0
            public ItemEnumerator(ActionLog owner)
            {
                this.owner = owner;

                saved_nextitem = owner.nextitem;
                Reset();
            }
예제 #3
0
        public static ActionLog Load(SourceSettings ss, IWarningLogger uilog)
        {
            ActionLog ld = null;

            if (uilog == null)
            {
                throw new ArgumentNullException();
            }

            string path = ss.PathToStateItem(LogName);

            if (File.Exists(path))
            {
                ld = (ActionLog)SafeFileSerializer.Load(path, uilog);
            }

            if (ld == null)
            {
                // Didn't exist or failed to recover
                ld = new ActionLog();
            }

            ld.uilog = uilog;
            return(ld);
        }
예제 #4
0
        public void Dispose()
        {
            if (disposed)
            {
                return;
            }

            if (proj != null)
            {
                proj.Dispose();
                proj = null;
            }

            if (log != null)
            {
                log.Save(ss);
                log = null;
            }

            if (ProfileStateUsage)
            {
                Console.Error.WriteLine("GRAPH STATE USAGE PROFILE:");
                Console.Error.WriteLine("{0}", graph);
            }

            graph = null;
            ss    = null;
            bm    = null;

            disposed = true;
        }
예제 #5
0
	public WrenchProject (SourceSettings ss, IGraphState graph, 
			      ActionLog log) 
	{
	    this.ss = ss;
	    this.log = log;
	    this.graph = graph;
	    this.manager = WrenchOperations.MakeManager (this);
	}
예제 #6
0
 public WrenchProject(SourceSettings ss, IGraphState graph,
                      ActionLog log)
 {
     this.ss      = ss;
     this.log     = log;
     this.graph   = graph;
     this.manager = WrenchOperations.MakeManager(this);
 }
예제 #7
0
	public bool LoadRest (IWarningLogger uilog) 
	{
	    if ((log = ActionLog.Load (ss, uilog)) == null)
		return true;

	    if ((graph = GetGraph ()) == null)
		return true;

	    if (ProfileStateUsage)
		graph = new GraphStateProfiler (graph);

	    proj = new WrenchProject (ss, graph, log);
	    return false;
	}
예제 #8
0
        public bool LoadRest(IWarningLogger uilog)
        {
            if ((log = ActionLog.Load(ss, uilog)) == null)
            {
                return(true);
            }

            if ((graph = GetGraph()) == null)
            {
                return(true);
            }

            if (ProfileStateUsage)
            {
                graph = new GraphStateProfiler(graph);
            }

            proj = new WrenchProject(ss, graph, log);
            return(false);
        }
예제 #9
0
	public void Dispose () {
	    if (disposed)
		return;
	    
	    if (proj != null) {
		proj.Dispose ();
		proj = null;
	    }

	    if (log != null) {
		log.Save (ss);
		log = null;
	    }

	    if (ProfileStateUsage) {
		Console.Error.WriteLine ("GRAPH STATE USAGE PROFILE:");
		Console.Error.WriteLine ("{0}", graph);
	    }

	    graph = null;
	    ss = null;
	    bm = null;

	    disposed = true;
	}
예제 #10
0
	public static ActionLog Load (SourceSettings ss, IWarningLogger uilog)
	{
	    ActionLog ld = null;

	    if (uilog == null)
		throw new ArgumentNullException ();

	    string path = ss.PathToStateItem (LogName);

	    if (File.Exists (path))
		ld = (ActionLog) SafeFileSerializer.Load (path, uilog);

	    if (ld == null)
		// Didn't exist or failed to recover
		ld = new ActionLog ();

	    ld.uilog = uilog;
	    return ld;
	}