Canoe
Comprehensive Atmosphere N' Ocean Engine
|
#include <cctype>
#include <cstring>
#include <fstream>
#include <sstream>
#include <stdexcept>
#include <vector>
#include <application/exceptions.hpp>
#include "fileio.hpp"
#include "vectorize.hpp"
Go to the source code of this file.
Functions | |
bool | FileExists (std::string fname) |
test file existance More... | |
bool | IsBlankLine (char const *line) |
test a blank line More... | |
bool | IsBlankLine (std::string const &line) |
std::string | DecommentFile (std::string fname) |
decomment a file More... | |
int | GetNumCols (std::string fname, char c) |
get number of columns in a data table More... | |
int | GetNumRows (std::string fname) |
get number of rows in a data table More... | |
void | replaceChar (char *buf, char c_old, char c_new) |
replace a character in a string More... | |
char * | StripLine (char *line) |
char * | NextLine (char *line, int num, FILE *stream) |
DataVector | read_data_vector (std::string fname) |
bool FileExists | ( | std::string | fname | ) |
test file existance
Definition at line 16 of file fileio.cpp.
bool IsBlankLine | ( | char const * | line | ) |
test a blank line
Definition at line 21 of file fileio.cpp.
bool IsBlankLine | ( | std::string const & | line | ) |
Definition at line 28 of file fileio.cpp.
std::string DecommentFile | ( | std::string | fname | ) |
decomment a file
Definition at line 30 of file fileio.cpp.
int GetNumCols | ( | std::string | fname, |
char | c | ||
) |
get number of columns in a data table
Definition at line 50 of file fileio.cpp.
int GetNumRows | ( | std::string | fname | ) |
get number of rows in a data table
Definition at line 62 of file fileio.cpp.
void replaceChar | ( | char * | buf, |
char | c_old, | ||
char | c_new | ||
) |
replace a character in a string
Definition at line 71 of file fileio.cpp.
char* StripLine | ( | char * | line | ) |
Definition at line 77 of file fileio.cpp.
char* NextLine | ( | char * | line, |
int | num, | ||
FILE * | stream | ||
) |
Definition at line 93 of file fileio.cpp.
DataVector read_data_vector | ( | std::string | fname | ) |
Definition at line 102 of file fileio.cpp.