]> git.sesse.net Git - xml-template/blob - c++0x/simple.cpp
Move the C++0x file processing logic into a shared function.
[xml-template] / c++0x / simple.cpp
1 #include <stdio.h>
2
3 #include "xml-template.h"
4
5 using namespace std;
6
7 int main(int argc, char **argv)
8 {
9         unordered_map<string, Directive*> master_map;
10         master_map.insert(make_pair("title", new Replace("A very basic example")));
11         master_map.insert(make_pair("#hello", new Replace("Hello world!")));
12
13         process_file("../xml/simple.xml", argv[1], new Substitute(master_map));
14         return(0);
15 }