OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimTempFilename.h>
Public Member Functions | |
ossimTempFilename (const ossimString &tempDir="", const ossimString &prefix="", const ossimString &extension="", bool autodelete=true, bool useWildcardDelete=true) | |
void | generateRandomFile () |
void | generateRandomDir () |
~ossimTempFilename () | |
![]() | |
ossimFilename () | |
ossimFilename (const ossimFilename &src) | |
ossimFilename (const ossimString &src) | |
ossimFilename (const std::string &src) | |
ossimFilename (const char *src) | |
const ossimFilename & | operator= (const ossimFilename &f) |
template<class Iter > | |
ossimFilename (Iter s, Iter e) | |
bool | operator== (const ossimFilename &rhs) const |
bool | operator== (const ossimString &rhs) const |
bool | operator== (const char *rhs) const |
bool | setTimes (ossimLocalTm *accessTime, ossimLocalTm *modTime, ossimLocalTm *createTime) const |
Writes f to the output stream os. More... | |
bool | getTimes (ossimLocalTm *accessTime, ossimLocalTm *modTime, ossimLocalTm *createTime) const |
ossim_int64 | lastAccessed () const |
Time in seconds since last accessed. More... | |
bool | touch () const |
ossimFilename | expand () const |
Method to do file name expansion. More... | |
bool | exists () const |
bool | isFile () const |
bool | isDir () const |
bool | isReadable () const |
bool | isUrl () const |
bool | isWriteable () const |
bool | isExecutable () const |
ossim_int64 | fileSize () const |
ossimString | ext () const |
ossimFilename | path () const |
ossimFilename | drive () const |
ossimFilename | file () const |
ossimFilename | fileNoExtension () const |
ossimFilename | noExtension () const |
ossimFilename & | setExtension (const ossimString &e) |
Sets the extension of a file name. More... | |
ossimFilename & | setDrive (const ossimString &d) |
Sets the file path and drive. More... | |
ossimFilename & | setPath (const ossimString &p) |
ossimFilename & | setFile (const ossimString &f) |
void | split (ossimString &drivePart, ossimString &pathPart, ossimString &filePart, ossimString &extPart) const |
void | merge (const ossimString &drivePart, const ossimString &pathPart, const ossimString &filePart, const ossimString &extPart) |
ossimFilename | dirCat (const ossimFilename &file) const |
bool | createDirectory (bool recurseFlag=true, int perm=0775) const |
bool | rename (const ossimFilename &destFile, bool overwriteDestinationFlag=true) const |
bool | remove () const |
bool | wildcardRemove () const |
bool | copyFileTo (const ossimFilename &outputFile) const |
Copies this file to output file. More... | |
bool | isRelative () const |
Checks whether file name is relative or absolute. More... | |
bool | needsExpansion () const |
Method to check if expansion is needed. More... | |
char | getPathSeparator () const |
ossimFilename & | appendTimestamp () |
Convenience method to append a generic timestamp to the base-name portion of the filename. More... | |
ossimFilename & | append (const ossimString &append_this_to_filename) |
Convenience method to append a string to the base-name portion of the filename. More... | |
std::string | native () const |
![]() | |
ossimString () | |
default constructor More... | |
ossimString (const std::string &s) | |
constructor that takes a std::string More... | |
ossimString (const char *aString) | |
constructor that takes char* NOTE: std::string construtor throws exception given null pointer; hence, the null check. More... | |
ossimString (const ossimString &aString) | |
copy constructor More... | |
ossimString (std::string::size_type n, char c) | |
constructor - constructs with n copies of c More... | |
ossimString (char aChar) | |
constructor - constructs with 1 c. More... | |
template<class Iter > | |
ossimString (Iter startIter, Iter endIter) | |
~ossimString () | |
destructor More... | |
bool | contains (char aChar) const |
bool | contains (const ossimString &aString) const |
bool | contains (const char *aString) const |
operator const std::string & () const | |
Type conversion operator to a const std::string&. More... | |
operator std::string & () | |
Type conversion operator to a std::string&. More... | |
operator const char * () const | |
Type conversion operator to a const char*. More... | |
const char * | chars () const |
For backward compatibility. More... | |
operator bool () const | |
const ossimString & | operator= (const std::string &s) |
const ossimString & | operator= (const char *s) |
const ossimString & | operator= (char c) |
const ossimString & | operator= (const ossimString &s) |
const ossimString & | operator+= (const ossimString &s) |
const ossimString & | operator+= (const std::string &s) |
const ossimString & | operator+= (const char *s) |
const ossimString & | operator+= (char c) |
const ossimString & | append (const ossimString &s) |
const ossimString & | append (const std::string &s) |
const ossimString & | append (const char *s) |
const char & | at (std::string::size_type n) const |
Provides access to the data contained in the string. More... | |
char & | at (std::string::size_type n) |
Provides access to the data contained in the string. More... | |
const ossimString & | append (std::string::size_type n, char c) |
Append n copies of c to *this. More... | |
ossimString | operator+ (const ossimString &s) const |
ossimString | operator+ (const std::string &s) const |
ossimString | operator+ (const char *s) const |
ossimString | operator+ (char c) const |
bool | operator== (const ossimString &rhs) const |
Test if this ossimString is equal to another ossimString. More... | |
bool | operator== (const char *rhs) const |
Test if this ossimString is equal to a C sting. More... | |
bool | operator!= (const ossimString &rhs) const |
Test if this ossimString is not equal to another ossimString. More... | |
bool | operator!= (const char *rhs) const |
Test if this ossimString is not equal to a C sting. More... | |
bool | operator< (const ossimString &rhs) const |
bool | operator<= (const ossimString &rhs) const |
bool | operator> (const ossimString &rhs) const |
bool | operator>= (const ossimString &rhs) const |
char & | operator[] (std::string::size_type i) |
const char & | operator[] (std::string::size_type i) const |
std::string & | insert (std::string::size_type pos, const char *s) |
If pos > size(), throws out_of_range. More... | |
void | push_back (char c) |
Equivalent to insert(end(), c). More... | |
std::string | substr (std::string::size_type pos=0, std::string::size_type n=std::string::npos) const |
Equivalent to basic_string(*this, pos, n). More... | |
ossimString | trim (const ossimString &valueToTrim=ossimString(" \\)) const |
this will strip lead and trailing character passed in. More... | |
ossimString & | trim (const ossimString &valueToTrim=ossimString(" \\)) |
ossimString | beforePos (std::string::size_type pos) const |
ossimString | afterPos (std::string::size_type pos) const |
ossimString | substitute (const ossimString &searchKey, const ossimString &replacementValue, bool replaceAll=false) const |
Substitutes searchKey string with replacementValue and returns a string. More... | |
ossimString & | gsub (const ossimString &searchKey, const ossimString &replacementValue, bool replaceAll=false) |
Substitutes searchKey string with replacementValue and returns a reference to *this. More... | |
std::vector< ossimString > | explode (const ossimString &delimeter) const |
ossimString | expandEnvironmentVariable () const |
If the variable "$(env_var_name)" is found in the string, where "env_var_name" is any system environment variable resolvable by the getenv() function, the variable is expanded in place and the result returned. More... | |
ossimString & | upcase () |
Upcases this string. More... | |
ossimString | upcase () const |
ossimString & | downcase () |
Downcases this string. More... | |
ossimString | downcase () const |
const char * | c_str () const |
Returns a pointer to a null-terminated array of characters representing the string's contents. More... | |
const char * | data () const |
Returns a pointer to an array of characters (not necessarily null-terminated) representing the string's contents. More... | |
std::string::size_type | size () const |
std::string::size_type | length () const |
bool | empty () const |
const std::string & | string () const |
std::string & | string () |
std::string::iterator | begin () |
std::string::iterator | end () |
std::string::const_iterator | begin () const |
std::string::const_iterator | end () const |
void | clear () |
Erases the entire container. More... | |
std::string::iterator | erase (std::string::iterator p) |
Erases the character at position p. More... | |
std::string::iterator | erase (std::string::iterator first, std::string::iterator last) |
Erases the range [first, last). More... | |
std::string & | erase (std::string::size_type pos=0, std::string::size_type n=std::string::npos) |
Erases a range. More... | |
std::string::size_type | find (const std::string &s, std::string::size_type pos=0) const |
Searches for s as a substring of *this, beginning at character pos of *this. More... | |
std::string::size_type | find (const char *s, std::string::size_type pos, std::string::size_type n) const |
Searches for the first n characters of s as a substring of *this, beginning at character pos of *this. More... | |
std::string::size_type | find (const char *s, std::string::size_type pos=0) const |
Searches for a null-terminated character array as a substring of *this, beginning at character pos of *this. More... | |
std::string::size_type | find (char c, std::string::size_type pos=0) const |
Searches for the character c, beginning at character position pos. More... | |
std::string::size_type | rfind (const std::string &s, std::string::size_type pos=0) const |
Searches backward for s as a substring of *this, beginning at character position min(pos, size()). More... | |
std::string::size_type | rfind (const char *s, std::string::size_type pos, std::string::size_type n) const |
Searches backward for the first n characters of s as a substring of *this, beginning at character position min(pos, size()). More... | |
std::string::size_type | rfind (const char *s, std::string::size_type pos=0) const |
Searches backward for a null-terminated character array as a substring of *this, beginning at character min(pos, size()). More... | |
std::string::size_type | rfind (char c, std::string::size_type pos=0) const |
Searches backward for the character c, beginning at character position min(pos, size(). More... | |
std::string::size_type | find_first_of (char c, std::string::size_type pos=0) const |
Equivalent to find(c, pos). More... | |
std::string::size_type | find_first_not_of (char c, std::string::size_type pos=0) const |
Returns the smallest character position N such that pos <= N < size(), and such that (*this)[N] does not compare equal to c. More... | |
std::string::size_type | find_first_of (const char *s, std::string::size_type pos=0) const |
Equivalent to find_first_of(s, pos, traits::length(s)). More... | |
std::string::size_type | find_first_not_of (const char *s, std::string::size_type pos=0) const |
Equivalent to find_first_not_of(s, pos, traits::length(s)). More... | |
std::string::size_type | find_last_of (char c, std::string::size_type pos=std::string::npos) const |
Equivalent to rfind(c, pos). More... | |
std::string & | assign (std::string::size_type n, char c) |
Erases the existing characters and replaces them by n copies of c. More... | |
std::string & | replace (std::string::size_type pos, std::string::size_type n, const std::string &s) |
Replaces a substring of *this with the string s. More... | |
std::string & | replace (std::string::iterator first, std::string::iterator last, const std::string &s) |
brief Equivalent to insert(erase(first, last), s.begin(), s.end()). More... | |
std::string & | replace (std::string::size_type pos, std::string::size_type n, const std::string &s, std::string::size_type pos1, std::string::size_type n1) |
Replaces a substring of *this with a substring of s. More... | |
void | reserve (std::string::size_type n) |
Requests that the string's capacity be changed. More... | |
ossimString | before (const ossimString &str, std::string::size_type pos=0) const |
METHOD: before(str, pos) Returns string beginning at pos and ending one before the token str If string not found or pos out of range the whole string will be returned. More... | |
ossimString | after (const ossimString &str, std::string::size_type pos=0) const |
METHOD: after(str, pos) Returns string immediately after the token str. More... | |
char * | stringDup () const |
bool | toBool () const |
String to numeric methods. More... | |
ossim_uint8 | toUInt8 () const |
int | toInt () const |
ossim_int16 | toInt16 () const |
ossim_uint16 | toUInt16 () const |
ossim_int32 | toInt32 () const |
ossim_uint32 | toUInt32 () const |
ossim_int64 | toInt64 () const |
ossim_uint64 | toUInt64 () const |
ossim_int64 | memoryUnitToInt64 () const |
This takes a string and will test for numeric followed by a unit type: More... | |
long | toLong () const |
toLong's deprecated, please use the toInts... More... | |
unsigned long | toULong () const |
ossim_float32 | toFloat32 () const |
ossim_float64 | toFloat64 () const |
double | toDouble () const |
void | split (std::vector< ossimString > &result, const ossimString &separatorList, bool skipBlankFields=false) const |
Splits this string into a vector of strings (fields) using the delimiter list specified. More... | |
std::vector< ossimString > | split (const ossimString &separatorList, bool skipBlankFields=false) const |
const ossimString & | join (const std::vector< ossimString > &stringList, const ossimString &separator) |
ossimString | beforeRegExp (const char *regularExpressionPattern) const |
Returns from start of string up to but not including found pattern. More... | |
ossimString | fromRegExp (const char *regularExpressionPattern) const |
Returns from position of found pattern to end of string. More... | |
ossimString | afterRegExp (const char *regularExpressionPattern) const |
Returns from position after found pattern to end of string. More... | |
ossimString | match (const char *regularExpressionPattern) const |
Returns from found pattern to end of pattern. More... | |
ossimString | replaceAllThatMatch (const char *regularExpressionPattern, const char *value="") const |
ossimString | replaceStrThatMatch (const char *regularExpressionPattern, const char *value="") const |
ossimString | urlEncode () const |
ossimString | getOssimId () const |
If OSSIM_ID_ENABLED returns the OSSIM_ID which currently is the expanded cvs. More... | |
Protected Member Functions | |
void | generate (bool createAsDirectoryFlag) |
![]() | |
void | converPathSeparator () |
Converts slashes of this to internal '/' format. More... | |
Protected Attributes | |
ossimString | theTempDir |
ossimString | thePrefix |
ossimString | theExtension |
bool | theAutoDeleteFlag |
bool | theWildCardDeleteFlag |
![]() | |
std::string | m_str |
Additional Inherited Members | |
![]() | |
enum | AccessModes { OSSIM_READ_WRITE = 6, OSSIM_READ = 4, OSSIM_WRITE = 2, OSSIM_EXE = 1, OSSIM_EXIST = 0 } |
![]() | |
typedef std::string::const_iterator | const_iterator |
typedef std::string::iterator | iterator |
typedef std::string::size_type | size_type |
![]() | |
static bool | remove (const ossimFilename &pathname) |
Removes pathname from filesystem if supported by platform. More... | |
static bool | wildcardRemove (const ossimFilename &pathname) |
Will use a wildcard remove. More... | |
![]() | |
static ossimString | upcase (const ossimString &aString) |
static ossimString | downcase (const ossimString &aString) |
static bool | toBool (const ossimString &aString) |
static ossim_uint8 | toUInt8 (const ossimString &aString) |
static int | toInt (const ossimString &aString) |
static ossim_int16 | toInt16 (const ossimString &aString) |
static ossim_uint16 | toUInt16 (const ossimString &aString) |
static ossim_int32 | toInt32 (const ossimString &aString) |
static ossim_uint32 | toUInt32 (const ossimString &aString) |
static ossim_int64 | toInt64 (const ossimString &aString) |
static ossim_uint64 | toUInt64 (const ossimString &aString) |
static ossim_int64 | memoryUnitToInt64 (const ossimString &aString) |
static long | toLong (const ossimString &aString) |
static unsigned long | toULong (const ossimString &aString) |
static ossim_float32 | toFloat32 (const ossimString &aString) |
static ossim_float64 | toFloat64 (const ossimString &aString) |
static double | toDouble (const ossimString &aString) |
static ossimString | toString (bool aValue) |
Numeric to string methods. More... | |
static ossimString | toString (ossim_int16 aValue) |
static ossimString | toString (ossim_uint16 aValue) |
static ossimString | toString (ossim_int32 aValue) |
static ossimString | toString (ossim_uint32 aValue) |
static ossimString | toString (ossim_int64 aValue) |
static ossimString | toString (ossim_uint64 aValue) |
static ossimString | toString (ossim_float32 aValue, ossim_int32 precision=8, bool fixed=false) |
static ossimString | toString (ossim_float64 aValue, ossim_int32 precision=15, bool fixed=false) |
static ossimString | stripLeading (const ossimString &value, char characterToStrip) |
![]() | |
static const ossimFilename | NIL =("") |
This was taken from Wx widgets for performing touch and access date stamps. More... | |
![]() | |
static const char | OSSIM_NATIVE_PATH_SEPARATOR = '/' |
static const char | OSSIM_FILENAME_PATH_SEPARATOR = '/' |
Definition at line 18 of file ossimTempFilename.h.
ossimTempFilename::ossimTempFilename | ( | const ossimString & | tempDir = "" , |
const ossimString & | prefix = "" , |
||
const ossimString & | extension = "" , |
||
bool | autodelete = true , |
||
bool | useWildcardDelete = true |
||
) |
Definition at line 20 of file ossimTempFilename.cpp.
ossimTempFilename::~ossimTempFilename | ( | ) |
Definition at line 33 of file ossimTempFilename.cpp.
References theAutoDeleteFlag, theWildCardDeleteFlag, and ossimFilename::wildcardRemove().
|
protected |
Definition at line 62 of file ossimTempFilename.cpp.
References ossimString::c_str(), ossimFilename::createDirectory(), ossimFilename::dirCat(), ossimFilename::exists(), ossimEnvironmentUtility::getEnvironmentVariable(), ossimEnvironmentUtility::instance(), ossimFilename::ossimFilename(), ossimFilename::setExtension(), theExtension, thePrefix, theTempDir, and ossimString::toString().
Referenced by generateRandomDir(), and generateRandomFile().
void ossimTempFilename::generateRandomDir | ( | ) |
Definition at line 57 of file ossimTempFilename.cpp.
References generate().
void ossimTempFilename::generateRandomFile | ( | ) |
Definition at line 52 of file ossimTempFilename.cpp.
References generate().
|
protected |
Definition at line 36 of file ossimTempFilename.h.
Referenced by ~ossimTempFilename().
|
protected |
Definition at line 35 of file ossimTempFilename.h.
Referenced by generate().
|
protected |
Definition at line 34 of file ossimTempFilename.h.
Referenced by generate().
|
protected |
Definition at line 33 of file ossimTempFilename.h.
Referenced by generate().
|
protected |
Definition at line 37 of file ossimTempFilename.h.
Referenced by ~ossimTempFilename().