41 lines
779 B
C++
41 lines
779 B
C++
// Read and print a file with format GRID2D_POINTS3D.
|
|
// Mainly for testing.
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
|
|
#include "grid2DPoints3D.h"
|
|
#include "grid2DIO.h"
|
|
|
|
|
|
// ********************* Functions ************************************
|
|
|
|
void UsageMsg(const std::string& command_name) {
|
|
std::cerr << "Usage: " << command_name << " {filename}\n";
|
|
}
|
|
|
|
|
|
// ********************* Main *****************************************
|
|
|
|
int main(int argc, char* argv[]) {
|
|
|
|
if (argc == 1) {
|
|
UsageMsg(argv[0]);
|
|
return 0;
|
|
}
|
|
|
|
GRID2D_POINTS3D grid2D;
|
|
|
|
try {
|
|
OpenReadGrid2DPoints3D(argv[1], grid2D);
|
|
}
|
|
catch (const std::exception&) {
|
|
std::cerr << "Exiting...\n";
|
|
return -1;
|
|
}
|
|
|
|
grid2D.FormattedPrint();
|
|
|
|
return 0;
|
|
}
|