Newer
Older
#include <fstream>
#include <vector>
#include "ParseCommandLine.h"
#include "ErrorCodes.h"
#include "gp_Pnt.hxx"
bool _hasCells; // Cells line defined
bool _hasRadii; // nRadii > 0
bool _hasCellSize; // Cell size given
bool _hasPositions; // Cell positions defined
bool _hasCellType; // Cell type defined
std::string _cellType; // Type of unit cell
size_t _nx, _ny, _nz; // nCells
double _cx, _cy, _cz; // cell size
std::vector<double> _radii; // Cell radii
std::vector<gp_Pnt> _points; // Cell positions
private:
std::vector<ErrorCodes> _errors;
bool parseFile(const std::string filepath);
void parseRadii(std::fstream& file, size_t nCells);
void parsePositions(std::fstream& file, size_t nPositions);
ParseInputFile(const ParseCommandLine& cmdln);
bool hasErrors() { return _errors.size() > 0; }
void dumpErrors();