Last change
on this file since 5600 was
5600,
checked in by jack, 16 years ago
|
More restructuring to use boost::shared_ptr.
|
File size:
916 bytes
|
Rev | Line | |
---|
[5487] | 1 | #include <iostream> |
---|
| 2 | #include <sstream> |
---|
[5600] | 3 | #include <boost/shared_ptr.hpp> |
---|
[5487] | 4 | #include <SDL.h> |
---|
| 5 | #include "anugavis.hh" |
---|
| 6 | #include "output.hh" |
---|
| 7 | |
---|
[5600] | 8 | using boost::shared_ptr; |
---|
[5487] | 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); |
---|
[5600] | 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)); |
---|
[5598] | 27 | anuga.add_HeightQuantity(elevation); |
---|
| 28 | anuga.add_HeightQuantity(stage); |
---|
| 29 | anuga.run(); |
---|
[5487] | 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.