VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fomSorter.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 1992-2010 VT MAK
3 ** All rights reserved.
4 *********************************************************************/
5 #ifndef fomSorter_h_
6 #define fomSorter_h_
7 
8 #include <vlutil/vlString.h>
9 #include <vlutil/vlFedTarget.h>
10 #include <vector>
11 #include <map>
12 
16 
17 #ifdef DtUSE_UTILITIES_NAMESPACE
18 namespace DtUSE_UTILITIES_NAMESPACE
19 {
20 #endif
21 
22  typedef std::pair< int, DtString > DtMMapPair;
23  typedef std::pair< DtString, int > DtFomCompPair;
24  typedef std::pair< DtString, std::vector<DtString> > DtFomDepsPair;
25  typedef std::pair< const DtString, const DtFomDepsPair > DtFileDepsPairPair;
26  typedef std::pair< DtString, DtString > DtFomFilePair;
27 
28  typedef std::multimap< int, DtString > DtComplexToFomsMMap;
29  // make this FOM dependency, not DtString
30  typedef std::map< DtString, int > DtFomToComplexMap;
31  typedef std::map< DtString, const DtFomDepsPair > DtFileToDepsPairMap;
32  typedef std::map< DtString, DtString > DtFomToFileMap;
33 
39  {
40  public:
41 
42  static DtFomSorter* create();
43 
48  virtual int mapFomDepComplexity(const DtFomDepsPair& fedTarget);
49 
52  virtual void sortFomFileNames( std::vector< DtString >* fomFileNames );
53 
55  virtual void insertFileToFomDepsPairMap(const DtString& key, const DtFomDepsPair& value);
56 
58  virtual void insertFomToFileMap( const DtString& key, const DtString& value );
59 
61  virtual const DtFomDepsPair& atFileToFomDepsPairMap(const DtString& key);
62 
64  virtual std::vector<DtString>& allDependencies();
65 
67  virtual std::vector<DtString>& allFomNames();
68 
70  virtual bool isEachDependencyValid();
71 
73  virtual const DtFileToDepsPairMap& fileToFomDepsPairMap();
74 
76  virtual int atFomToComplexMap( DtString& key );
77 
79  virtual const DtFomToComplexMap& fomToComplexMap();
80 
82  virtual DtString atFomToFileMap( DtString& key );
83 
85  virtual const DtFomToFileMap& fomToFileMap();
86 
87  protected:
88 
93 
94  std::vector<DtString> myAllDependencies;
95  std::vector<DtString> myAllFomNames;
96  };
97 
98 #ifdef DtUSE_UTILITIES_NAMESPACE
99 }
100 #endif
101 #endif // fomSorter_h_

Document ID: Generated on Mon Apr 8 04:49:21 EDT 2019 from SVN revision 197403
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)