|
WXP C++ Library Version 6.74.9
|
This class creates filenames. More...
#include "../include/Filename.h"
Public Member Functions | |
| int | initParam () |
| int | init () |
| Filename (const char *nameconv, const char *str) | |
| Filename (const char *nameconv, Date &rdate) | |
| Filename (const char *filename) | |
| Filename () | |
| ~Filename () | |
| int | set (const char *nameconv, const char *str) |
| int | set (const char *nameconv, Date &rdate) |
| int | set (const char *filename) |
| bool | isSet () |
| int | setNameConv (const char *nameconv) |
| int | setPath (const char *path) |
| int | setDate (Date &rdate) |
| int | getDate (Date &rdate) |
| DateVal | getDateval () |
| int | getOffset () |
| int | setFixDate (DateVal &rdate) |
| int | setFixDate (const char *str) |
| int | setType (const char *rtype) |
| const char * | getType () |
| int | setForeTime (int time) |
| int | getForeTime () |
| int | setKey (char ch, const char *str) |
| const char * | getExt () |
| const char * | getKey (char ch) |
| int | setName (const char *rname) |
| const char * | getName () |
| const char * | getName (int ind) |
| int | setHeader (const char *rname) |
| const char * | getHeader () |
| bool | validHeader () |
| int | addOutPath (const char *path) |
| bool | isFixed () |
| int | setNumFiles (int val) |
| int | setNumFiles (const char *str) |
| int | getNumFiles () |
| int | getNumType () |
| int | setOutput (bool val) |
| int | setLateLimit (int val) |
| int | setLateDate (Date rdate) |
| int | setBaseDate (Date &rdate) |
| int | checkFile (const char *file) |
| int | setFile (Date &rdate) |
| int | setFile (Date &rdate, const char *param) |
| int | setFile (const char *file) |
| int | setFile () |
| bool | exist () |
| int | setFile (int ind) |
| int | listFile () |
| int | print () |
| int | printConv () |
Static Public Attributes | |
| static const int | UNK = 0 |
| static const int | HOURS = 1 |
| static const int | FILES = 2 |
This class creates filenames.
| Filename::Filename | ( | const char * | nameconv, |
| const char * | str ) |
| Filename::Filename | ( | const char * | nameconv, |
| Date & | rdate ) |
| Filename::Filename | ( | const char * | filename | ) |
| Filename::Filename | ( | ) |
Constructor. Initializes class data
References init().
| Filename::~Filename | ( | ) |
Destructor.
| int Filename::checkFile | ( | const char * | file | ) |
Check the specified filename for specific parameters
| file | Filename to check |
References WXP::StrLib::equal(), WXP::Wxp::exit(), WXP::NameConvFile::getDate(), WXP::NameConvFile::getFilename(), WXP::NameConvFile::getHdrFilename(), WXP::StrLib::iequal(), WXP::FileTool::isFullPath(), WXP::FileTool::isStdio(), WXP::Const::MISS, WXP::Wxp::NOERR, and WXP::StrLib::valid().
| int Filename::getDate | ( | Date & | rdate | ) |
Gets the current date used in the filename
| rdate | The output date class |
Referenced by WXP::GridCont::draw(), WXP::RadMask::getGrids(), WXP::MosFile::open(), WXP::ProfFile::open(), WXP::WarnFile::open(), WXP::WatchFile::open(), and WXP::MdrImage::readFile().
| DateVal Filename::getDateval | ( | ) |
Gets the current date used in the filename
Referenced by WXP::GribFile::open().
| const char * Filename::getHeader | ( | ) |
| const char * Filename::getName | ( | ) |
Gets the filename
Referenced by WXP::GridCont::draw(), WXP::GridVect::draw(), WXP::RadMask::getGrids(), WXP::RadMask::getGrids(), WXP::GribFile::open(), WXP::GridFile::open(), WXP::MetarFile::open(), WXP::ProfFile::open(), WXP::WatchFile::open(), WXP::NidsImage::readSite(), WXP::SatFile::SatFile(), and WXP::NidsImage::setImage().
| const char * Filename::getName | ( | int | ind | ) |
Gets the filename from the stored filenames
| ind | The index of the filename in the array |
| int Filename::getNumFiles | ( | ) |
Gets the number of files used in a series
| const char * Filename::getType | ( | ) |
| int Filename::init | ( | ) |
Initializes class data
References UNK.
Referenced by Filename(), Filename(), Filename(), and Filename().
| int Filename::initParam | ( | ) |
Initializes parameters
| int Filename::listFile | ( | ) |
Produces a list of available files based on the name convention.
References WXP::FileTool::exist(), WXP::String::get(), WXP::FileTool::getPath(), WXP::String::length(), WXP::FileTool::numPath(), and WXP::Wxp::outMessage().
Referenced by setFile().
| int Filename::print | ( | ) |
Prints class values to standard output
References FILES, HOURS, and WXP::StrLib::valid().
| int Filename::set | ( | const char * | filename | ) |
| int Filename::set | ( | const char * | nameconv, |
| const char * | str ) |
Sets the filenames given a name convention and file parameter string
| nameconv | Name convention tag |
| str | File parameter string such as "la" for latest or time number. |
References WXP::StrLib::copy(), WXP::FileTool::exist(), WXP::NameConvFile::getDate(), WXP::NameConvFile::getFilename(), and WXP::NameConvFile::getHdrFilename().
Referenced by Filename(), Filename(), and Filename().
| int Filename::set | ( | const char * | nameconv, |
| Date & | rdate ) |
Sets the filename given and name convention and date
| nameconv | Name convention string to use |
| rdate | Date values to set filename with |
References WXP::StrLib::copy(), WXP::NameConvFile::getDate(), WXP::NameConvFile::getFilename(), and WXP::NameConvFile::getHdrFilename().
| int Filename::setBaseDate | ( | Date & | rdate | ) |
Sets the name convention base date
| rdate | Output date class |
References WXP::Date::fix().
| int Filename::setDate | ( | Date & | rdate | ) |
Sets the filename given a date (name convention already set).
| rdate | Date values to set filename from |
| int Filename::setFile | ( | ) |
Sets the filename, checks for existence and prompts user if not specified through resources.
| prompt | The filename prompt |
References checkFile(), WXP::StrLib::equal(), WXP::FileTool::exist(), WXP::Wxp::exit(), FILES, WXP::NameConvFile::getDate(), WXP::NameConvFile::getFilename(), WXP::NameConvFile::getHdrFilename(), WXP::StrLib::index(), listFile(), and WXP::Wxp::NOERR.
| int Filename::setFile | ( | const char * | filename | ) |
Sets the filename by querying a set of resources
| filename | Optional filename |
References checkFile(), FILES, WXP::NameConvFile::getDate(), WXP::NameConvFile::getFilename(), WXP::NameConvFile::getHdrFilename(), WXP::StrLib::index(), setNumFiles(), and WXP::StrLib::valid().
| int Filename::setFile | ( | Date & | rdate | ) |
Sets the filename given a date (name convention already set).
| rdate | Date values to set filename from |
References WXP::FileTool::exist(), WXP::NameConvFile::getDate(), WXP::NameConvFile::getFilename(), WXP::NameConvFile::getHdrFilename(), WXP::Date::getSeconds(), and WXP::Const::MISS.
Referenced by WXP::GridVect::draw(), WXP::RadMask::getGrids(), and WXP::NidsPlot::setFilename().
| int Filename::setFile | ( | int | ind | ) |
Sets the filename based on an offset from current time. This is meant for series of files.
| ind | Index multiplied by the time offset. |
References WXP::Date::addSeconds(), FILES, WXP::NameConvFile::getDate(), WXP::NameConvFile::getFilename(), and WXP::NameConvFile::getHdrFilename().
| int Filename::setFixDate | ( | const char * | str | ) |
Sets the set date used to determine files. Parameters in date fix those values in filename. Default is undefined.
| str | Set date for files |
| int Filename::setFixDate | ( | DateVal & | rdate | ) |
Sets the set date used to determine files. Parameters in date fix those values in filename. Default is undefined.
| rdate | Set date for files |
| int Filename::setHeader | ( | const char * | rname | ) |
Sets the header filename
| rname | The heade file name |
| int Filename::setLateDate | ( | Date | rdate | ) |
Sets the base date used to determine latest files. Default is current time.
| rdate | Base date for latest files |
| int Filename::setLateLimit | ( | int | val | ) |
Sets the number of times to look back to find the latest file.
| val | The number of offset times. |
| int Filename::setName | ( | const char * | rname | ) |
| int Filename::setNameConv | ( | const char * | nameconv | ) |
Sets the name convention
| nameconv | Name convention string |
References WXP::StrLib::copy().
Referenced by WXP::HodoPlot::draw(), WXP::SoundPlot::draw(), and WXP::RadMask::getGrids().
| int Filename::setNumFiles | ( | const char * | str | ) |
Sets the number of files in a series
| str | String containing series parameters |
References WXP::Const::MISS, WXP::Wxp::outDebug(), and WXP::StrLib::valid().
| int Filename::setNumFiles | ( | int | val | ) |
| int Filename::setOutput | ( | bool | val | ) |
Sets whether the file is an output file or not. If output, cannot search for latest file.
| val | Whether output file |
| int Filename::setPath | ( | const char * | str | ) |
Sets the file path
| str | User defined file path |
| int Filename::setType | ( | const char * | rtype | ) |
| bool Filename::validHeader | ( | ) |
Returns if the header filename has a valid string in it.
Referenced by WXP::GribFile::open().
|
static |
Multiple files by list of files
Referenced by WXP::SatPlot::draw(), print(), setFile(), setFile(), and setFile().
|
static |
Multiple files by time
Referenced by print().
|
static |
Multiple files by time
Referenced by init().