Organize and analyze the name of a standard file name. More...
#include <stdFileName.hpp>

Public Member Functions | |
| stdFileName () | |
| Default c'tor.   | |
| stdFileName (const std::string &fullName) | |
| Construct from a full name.   | |
| stdFileName & | operator= (const std::string &fullname) | 
| Assignment operator from string.   | |
| mx::error_t | fullName (const std::string &fullName) | 
| Sets the full name.   | |
| const std::string & | fullName (mx::error_t *errc=nullptr) const | 
| Get the current value of m_fullName.   | |
| const std::string & | baseName (mx::error_t *errc=nullptr) const | 
| Get the current value of m_baseName.   | |
| const std::string & | extension (mx::error_t *errc=nullptr) const | 
| Get the current value of.   | |
| const std::string & | appName (mx::error_t *errc=nullptr) const | 
| Get the current value of m_appName.   | |
| const stdSubDir< verboseT > & | subDir (mx::error_t *errc=nullptr) const | 
| Get the current value of m_subDir.   | |
| int | year (mx::error_t *errc=nullptr) const | 
| Get the year.   | |
| unsigned | month (mx::error_t *errc=nullptr) const | 
| Get the month.   | |
| unsigned | day (mx::error_t *errc=nullptr) const | 
| Get the day.   | |
| int | hour (mx::error_t *errc=nullptr) const | 
| Get the current value of m_hour.   | |
| int | minute (mx::error_t *errc=nullptr) const | 
| Get the current value of m_minute.   | |
| int | second (mx::error_t *errc=nullptr) const | 
| Get the current value of m_second.   | |
| int | nsec (mx::error_t *errc=nullptr) const | 
| Get the current value of m_nsec.   | |
| flatlogs::timespecX | timestamp (mx::error_t *errc=nullptr) const | 
| Get the current value of m_valid.   | |
| bool | valid () const | 
| Get the current value of.   | |
| void | invalidate () | 
| Set all stored values to invalid values.   | |
Protected Attributes | |
| std::string | m_fullName | 
| The full name of the file, including path.   | |
| std::string | m_baseName | 
| The base name of the file, not including path.   | |
| std::string | m_extension | 
| The extension of the file.   | |
| std::string | m_appName | 
| The name of the application which wrote the file.   | |
| stdSubDir< verboseT > | m_subDir | 
| The subdirectory of the file.   | |
| int | m_hour { 0 } | 
| The hour of the timestamp.   | |
| int | m_minute { 0 } | 
| The minute of the timestamp.   | |
| int | m_second { 0 } | 
| The second of the timestamp.   | |
| int | m_nsec { 0 } | 
| The nanosecond of the timestamp.   | |
| flatlogs::timespecX | m_timestamp { 0, 0 } | 
| The timestamp.   | |
| bool | m_valid { false } | 
| Whether or not the filename parsed correctly and the components are valid.   | |
Organize and analyze the name of a standard file name.
Definition at line 35 of file stdFileName.hpp.
| MagAOX::file::stdFileName< verboseT >::stdFileName | ( | ) | 
Default c'tor.
Definition at line 203 of file stdFileName.hpp.
      
  | 
  explicit | 
Construct from a full name.
This calls fullName(const std::string &), which parses the input and populates all fields.
On success, sets m_valid=true
| nested | MagAOX::xwcException on an exception from fullName. | 
| [in] | fullName | The new full name of the file (including the path) | 
Definition at line 209 of file stdFileName.hpp.
| const std::string & MagAOX::file::stdFileName< verboseT >::appName | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_appName.
| [in] | errc | [optional] error code | 
Definition at line 454 of file stdFileName.hpp.
Referenced by MagAOX::logger::logMap< verboseT >::addFileListToFileMap(), libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| const std::string & MagAOX::file::stdFileName< verboseT >::baseName | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_baseName.
| [in] | errc | [optional] error code | 
Definition at line 416 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| unsigned int MagAOX::file::stdFileName< verboseT >::day | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the day.
| [in] | errc | [optional] error code | 
Definition at line 532 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| const std::string & MagAOX::file::stdFileName< verboseT >::extension | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of.
| [in] | errc | [optional] error code | 
Definition at line 435 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| mx::error_t MagAOX::file::stdFileName< verboseT >::fullName | ( | const std::string & | fullName | ) | 
Sets the full name.
Setting the full name is the only way to set any of the values. This parses the input and populates all fields.
| nested | MagAOX::xwcException on a bad_alloc exception. | 
| [in] | fullName | The new full name of the file (including the path) | 
Definition at line 246 of file stdFileName.hpp.
References MagAOX::file::parseFilePath().
Referenced by MagAOX::logger::logMap< verboseT >::loadAppToFileMap(), MagAOX::logger::logInMemory::loadFile(), libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| const std::string & MagAOX::file::stdFileName< verboseT >::fullName | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_fullName.
| [in] | errc | [optional] error code | 
Definition at line 397 of file stdFileName.hpp.
| int MagAOX::file::stdFileName< verboseT >::hour | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_hour.
| [in] | errc | [optional] error code | 
Definition at line 552 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| void MagAOX::file::stdFileName< verboseT >::invalidate | ( | ) | 
Set all stored values to invalid values.
Definition at line 658 of file stdFileName.hpp.
References MagAOX::file::stdFileName< verboseT >::invalidate().
Referenced by MagAOX::file::stdFileName< verboseT >::invalidate().
| int MagAOX::file::stdFileName< verboseT >::minute | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_minute.
| [in] | errc | [optional] error code | 
Definition at line 572 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| unsigned int MagAOX::file::stdFileName< verboseT >::month | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the month.
| [in] | errc | [optional] error code | 
Definition at line 512 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| int MagAOX::file::stdFileName< verboseT >::nsec | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_nsec.
| [in] | errc | [optional] error code | 
Definition at line 612 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| stdFileName< verboseT > & MagAOX::file::stdFileName< verboseT >::operator= | ( | const std::string & | fullname | ) | 
Assignment operator from string.
Sets the full name, which is the only way to set any of the values. This parses the input and populates all fields.
On success, sets m_valid=true
On error, sets m_valid=false
this| nested | MagAOX::xwcException on an exception from fullName. | 
| [in] | fullname | The new full name of the file (including the path) | 
Definition at line 226 of file stdFileName.hpp.
| int MagAOX::file::stdFileName< verboseT >::second | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_second.
| [in] | errc | [optional] error code | 
Definition at line 592 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| const stdSubDir< verboseT > & MagAOX::file::stdFileName< verboseT >::subDir | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_subDir.
| [in] | errc | [optional] error code | 
Definition at line 473 of file stdFileName.hpp.
Referenced by MagAOX::logger::logMap< verboseT >::loadAppToFileMap(), libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| flatlogs::timespecX MagAOX::file::stdFileName< verboseT >::timestamp | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the current value of m_valid.
| [in] | errc | [optional] error code | 
Definition at line 632 of file stdFileName.hpp.
Referenced by MagAOX::logger::logMap< verboseT >::loadAppToFileMap(), libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| bool MagAOX::file::stdFileName< verboseT >::valid | ( | ) | const | 
Get the current value of.
Definition at line 652 of file stdFileName.hpp.
Referenced by MagAOX::logger::logMap< verboseT >::addFileListToFileMap(), MagAOX::logger::logMap< verboseT >::loadAppToFileMap(), libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
| int MagAOX::file::stdFileName< verboseT >::year | ( | mx::error_t * | errc = nullptr | ) | const | 
Get the year.
| [in] | errc | [optional] error code | 
Definition at line 492 of file stdFileName.hpp.
Referenced by libXWCTest::fileTest::stdFileNameTest::TEST_CASE(), and libXWCTest::fileTest::stdFileNameTest::TEST_CASE().
      
  | 
  protected | 
The name of the application which wrote the file.
Definition at line 44 of file stdFileName.hpp.
      
  | 
  protected | 
The base name of the file, not including path.
Definition at line 40 of file stdFileName.hpp.
      
  | 
  protected | 
The extension of the file.
Definition at line 42 of file stdFileName.hpp.
      
  | 
  protected | 
The full name of the file, including path.
Definition at line 39 of file stdFileName.hpp.
      
  | 
  protected | 
The hour of the timestamp.
Definition at line 48 of file stdFileName.hpp.
      
  | 
  protected | 
The minute of the timestamp.
Definition at line 49 of file stdFileName.hpp.
      
  | 
  protected | 
The nanosecond of the timestamp.
Definition at line 51 of file stdFileName.hpp.
      
  | 
  protected | 
The second of the timestamp.
Definition at line 50 of file stdFileName.hpp.
      
  | 
  protected | 
The subdirectory of the file.
Definition at line 46 of file stdFileName.hpp.
      
  | 
  protected | 
The timestamp.
Definition at line 53 of file stdFileName.hpp.
      
  | 
  protected | 
Whether or not the filename parsed correctly and the components are valid.
Definition at line 55 of file stdFileName.hpp.