ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/SiteMapper/SiteMapper.cpp
Revision: 129
Committed: 2004-03-23T22:49:41-08:00 (21 years, 3 months ago) by Douglas Thrift
File size: 1082 byte(s)
Log Message:
It compiles!

File Contents

# User Rev Content
1 Douglas Thrift 126 // Site Mapper
2     //
3     // Douglas Thrift
4     //
5     // $Id$
6    
7     #include "SiteMapper.hpp"
8     #include "Matcher.hpp"
9 Douglas Thrift 128 #include "Page.hpp"
10 Douglas Thrift 126
11     #include <xalanc/Include/PlatformDefinitions.hpp>
12     #include <xercesc/util/PlatformUtils.hpp>
13     #include <xalanc/XPath/XPathEvaluator.hpp>
14    
15     XALAN_USING_XERCES(XMLPlatformUtils)
16     XALAN_USING_XALAN(XPathEvaluator)
17    
18 Douglas Thrift 128 string program;
19     bool debug = false;
20    
21 Douglas Thrift 126 int main(int argc, char* argv[])
22     {
23 Douglas Thrift 128 program = argv[0];
24    
25 Douglas Thrift 126 string siteIndex, siteMap;
26    
27     for (int index = 1; index < argc; argc++)
28     {
29 Douglas Thrift 128 string arg(argv[index]);
30     Matcher matcher;
31 Douglas Thrift 126
32 Douglas Thrift 128 if (arg == matcher("^-index=(.*)$"))
33     {
34     siteIndex = matcher[1];
35     }
36     else if (arg == matcher("^-map=(.*)$"))
37     {
38     siteMap = matcher[1];
39     }
40 Douglas Thrift 126 }
41    
42 Douglas Thrift 128 if (siteIndex != "" && siteMap != "")
43     {
44     XMLPlatformUtils::Initialize();
45     XPathEvaluator::initialize();
46 Douglas Thrift 126
47 Douglas Thrift 128 SiteMapper mapper(siteIndex, siteMap);
48    
49     XPathEvaluator::terminate();
50     XMLPlatformUtils::Terminate();
51     }
52     else
53     {
54     cout << "Usage: " << program << " -index=index -map=map\n";
55     }
56 Douglas Thrift 129
57 Douglas Thrift 126 return 0;
58     }
59    
60     SiteMapper::SiteMapper(const string& siteIndex, const string& siteMap)
61     {
62     //
63     }

Properties

Name Value
svn:eol-style native
svn:keywords Id