Go to the documentation of this file.
44 #ifndef GNSSTK_FILESPEC_HPP
45 #define GNSSTK_FILESPEC_HPP
55 const char slash =
'\\';
161 {
init(fileSpec);
return *
this;}
184 virtual std::string
extractField(
const std::string& filename,
239 virtual void sortList(std::vector<std::string>& fileList,
243 virtual void dump(std::ostream& o)
const;
249 virtual void init(
const std::string& fileSpec);
274 const std::string::size_type offs = 0,
276 const std::string& fld = std::string())
293 public std::binary_function<std::string,std::string,bool>
301 bool operator() (
const std::string& l,
const std::string& r)
const;
std::map< FileSpecType, std::string > FSTStringMap
@ fullgpsweek
'F' A field for full GPS weeks
@ fullzcount
'C' or 'c' A field for Full GPS Z-count
FileSpecSort(const FileSpec &fs, const FileSpecSortType s)
@ clock
'k' A field for the clock number
FileSpecSortType sortDir
ascending or descending
bool hasTimeField() const
Return true if this FileSpec has any time fields.
bool operator()(const std::string &l, const std::string &r) const
@ end
A place holder for the end of this list.
@ selected
't' A field for selected/unselected receiver
@ gpsweek
'G' A field for 10 bit GPS weeks
virtual void init(const std::string &fileSpec)
FileSpecType type
The type which this field corresponds to.
std::string fileSpecString
Holds the string that the fileSpecList was generated from.
NEW_EXCEPTION_CLASS(FileSpecException, gnsstk::Exception)
@ minute
'M' A field for minutes (out of 60)
@ firstTime
First enumeration value pertaining to time.
@ sequence
'I' A sequence number, as in part 1, part 2, etc..
virtual gnsstk::CommonTime extractCommonTime(const std::string &filename) const
FileSpec(const std::string &fileSpec)
@ unixusec
'u' A field for UNIX microseconds
@ fsecond
'f' A field for seconds (float)
@ zcount
'Z' A field for GPS Z-count
bool hasNonTimeField() const
Return true if this FileSpec has any non-time fields.
virtual std::string extractField(const std::string &filename, const FileSpecType) const
std::vector< FileSpecElement > fileSpecList
Holds all of the FileSpecElements for this FileSpec.
@ dayofmonth
'd' A field for day-of-month
virtual std::string createSearchString() const
FileSpec::FileSpecType & operator--(FileSpec::FileSpecType &fst, int)
Operator– for FileSpecType.
@ month
'm' A field for month (numeric)
virtual std::string getSpecString(void) const
Returns the string of the filespec.
@ doysecond
's' a field for second-of-day (float)
virtual ~FileSpec()
Destructor.
virtual bool hasField(FileSpecType fst) const
std::string::size_type offset
The offset in the string where this field begins.
@ year
'y' or 'Y' A field for a year
@ receiver
'r' A field for the receiver number
FileSpecElement(const std::string::size_type numChars=0, const std::string::size_type offs=0, const FileSpecType fst=unknown, const std::string &fld=std::string())
This is the default constructor too.
FileSpec()
Default constructor.
@ station
'n' A field for station numbers
@ day
'j' A field for day of year
virtual std::string toString(const gnsstk::CommonTime &dt, const FSTStringMap &fstsMap=FSTStringMap()) const
virtual void sortList(std::vector< std::string > &fileList, const FileSpecSortType fsst=ascending) const
@ mjd
'Q' A field for Modified Julian Date
@ zcountfloor
'z' A field for GPS Z-count rounded down
@ unixsec
'U' A field for UNIX seconds
@ fixed
A field for fixed characters.
@ dayofweek
'w' A field for day-of-week (numeric)
virtual void dump(std::ostream &o) const
semi-nicely print the FileSpec to the stream.
std::set< FileSpecType > fileSpecSet
Set of all FileSpecType values present in this FileSpec.
virtual FileSpec & newSpec(const std::string &fileSpec)
@ hour
'H' A field for hours (out of 24)
@ gpssecond
'g' A field for GPS second-of-week
FileSpec::FileSpecType & operator++(FileSpec::FileSpecType &fst, int)
Operator++ for FileSpecType.
@ second
'S' A field for seconds (out of 60)
@ prn
'p' A field for PRN number
const FileSpec & fileSpec
The FileSpec doing the sorting.
static std::string convertFileSpecType(const FileSpecType)
std::string::size_type numCh
The number of characters this field is in the file name.
gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:39