GlsMap Toolkit  1.4.1
disti::VPFUtil::FilePath Class Reference

#include <vpf_util.h>

Public Member Functions

 FilePath (void)
 
 FilePath (const FilePath &src)
 
 FilePath (const char *const path, const bool isDirectory)
 
const char * Append (const char *const name, const bool isDirectory, const bool forceUpperCase=true, const bool killTrailingWS=true)
 
bool IsValid (void) const
 
const char * GetFilePath (void) const
 

Static Public Attributes

static const char DIR_SEPARATOR = '/'
 

Protected Types

enum  { MAX_PATH_LENGTH = 512 }
 

Protected Attributes

WarningBool _isValid
 
char _pathStr [MAX_PATH_LENGTH+1u]
 

Detailed Description

encapsulates full path / full filename to a directory / file

Member Enumeration Documentation

anonymous enum
protected

longest possible path

Constructor & Destructor Documentation

VPFUtil::FilePath::FilePath ( void  )

Ctor

VPFUtil::FilePath::FilePath ( const FilePath src)

copy Ctor

VPFUtil::FilePath::FilePath ( const char *const  path,
const bool  isDirectory 
)

Construct from a path

Parameters
pathpath
isDirectorytrue if path is a directory path else false

Member Function Documentation

const char * VPFUtil::FilePath::Append ( const char *const  name,
const bool  isDirectory,
const bool  forceUpperCase = true,
const bool  killTrailingWS = true 
)

Append a filename or directory name. Check IsValid()

Parameters
namename of file or directory (should not end in DIR_SEPARATOR)
isDirectorytrue if appending a directory name else false
forceUpperCase[optional, defaults to true] true to force appended string to all uppercase
killTrailingWS[optional, defaults to true] true to kill any traling whitespace in appended string
Returns
updated path string
const char* disti::VPFUtil::FilePath::GetFilePath ( void  ) const
inline

Get the file path string

Returns
the file path string
bool disti::VPFUtil::FilePath::IsValid ( void  ) const
inline

Determine if the path is valid

Returns
true if valid else false

Member Data Documentation

WarningBool disti::VPFUtil::FilePath::_isValid
protected

true if path is valid else false

char disti::VPFUtil::FilePath::_pathStr[MAX_PATH_LENGTH+1u]
protected

full path plus terminator

const char VPFUtil::FilePath::DIR_SEPARATOR = '/'
static

directory separator char


The documentation for this class was generated from the following files: