~ubuntu-branches/ubuntu/raring/voxbo/raring

« back to all changes in this revision

Viewing changes to vbsequence/vbfilenetwork.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2010-06-06 11:33:11 UTC
  • Revision ID: james.westby@ubuntu.com-20100606113311-v3c13imdkkd5n7ae
Tags: upstream-1.8.5~svn1172
ImportĀ upstreamĀ versionĀ 1.8.5~svn1172

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __VBFILENETWORK_H__
 
2
#define __VBFILENETWORK_H__
 
3
 
 
4
#include <string>
 
5
#include <list>
 
6
#include <set>
 
7
#include <map>
 
8
 
 
9
#include "vbjob.h"
 
10
 
 
11
namespace VB
 
12
{
 
13
 
 
14
  // like a vector<tuple<Job*, Job*, File*, File*> >.  using tuple would be cool
 
15
  // but would introduce an additional library dependency (boost).  i mean, if we
 
16
  // use boost, we might as well use bgl.
 
17
  struct FileNetwork
 
18
  {
 
19
        typedef std::pair<Job*,Job*> Edge;
 
20
        typedef std::map<std::string, FileNetwork> Map;
 
21
        
 
22
        std::string fileid;
 
23
        std::list<Edge> edges;
 
24
        std::list<Job*> jobs;
 
25
        std::string curname;
 
26
        std::map<Job*,std::pair<std::string,std::string> > filenames;
 
27
        
 
28
        void insert_job(Job* job);
 
29
        bool check_edge(Job*, Job*);
 
30
        bool check_edge(const Edge& edge);
 
31
        void reset_name();
 
32
        
 
33
        /* how do we get the files to correctly resolve $$ ? */
 
34
        
 
35
        std::set<Edge> get_edges_from(Job*) const;
 
36
        std::set<Edge> get_edges_to(Job*) const;
 
37
  };
 
38
 
 
39
}
 
40
 
 
41
#endif // __VBFILENETWORK_H__