Last change
on this file since 5685 was
5600,
checked in by jack, 17 years ago
|
More restructuring to use boost::shared_ptr.
|
File size:
916 bytes
|
Line | |
---|
1 | #include <iostream> |
---|
2 | #include <sstream> |
---|
3 | #include <boost/shared_ptr.hpp> |
---|
4 | #include <SDL.h> |
---|
5 | #include "anugavis.hh" |
---|
6 | #include "output.hh" |
---|
7 | |
---|
8 | using boost::shared_ptr; |
---|
9 | using std::cout; |
---|
10 | using std::endl; |
---|
11 | using std::ostringstream; |
---|
12 | |
---|
13 | extern "C" |
---|
14 | int main(int argc, char *argv[]){ |
---|
15 | if(argc != 2){ |
---|
16 | ostringstream ss; |
---|
17 | ss << "Usage: " << argv[0] << " sww_file_name"; |
---|
18 | output_string(ss.str()); |
---|
19 | return 1; |
---|
20 | } |
---|
21 | try{ |
---|
22 | AnugaVis anuga(argv[1], 640, 480); |
---|
23 | shared_ptr<HeightQuantity> elevation(new HeightQuantity("elevation", 0, 1, |
---|
24 | 0.5, 0.5, 0.5)); |
---|
25 | shared_ptr<HeightQuantity> stage(new HeightQuantity("stage", 0, 1, |
---|
26 | 0, 0, 0.8)); |
---|
27 | anuga.add_HeightQuantity(elevation); |
---|
28 | anuga.add_HeightQuantity(stage); |
---|
29 | anuga.run(); |
---|
30 | }catch(const char *str){ |
---|
31 | output_string(string(str)); |
---|
32 | }catch(string &str){ |
---|
33 | output_string(str); |
---|
34 | return 1; |
---|
35 | } |
---|
36 | return 0; |
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.