Home Libraries Author Links

stm::pstring Class Reference
[FilesysAids: File System Aids]

Inheritance diagram for stm::pstring:

Inheritance graph
[legend]

List of all members.


Detailed Description

Class to represent a std::string with a case unsensitive order relation on Windows systems else with a case sensitive order relation used for file system element naming.

Definition at line 150 of file filesysaids.hpp.


Public Member Functions

 pstring (const std::string &path=std::string())
 Constructs a pstring representing path.
 pstring (const char *path)
 Constructs a pstring representing path.
bool isContainedIn (const std::string &dir) const
 Return true, if this pstring object designates the same file system element than that dir designates, or if the file system element designated by dir is a directory and this pstring object designates a file system element contained in the tree spanned by the directory designated by dir.
bool designatesSame (const std::string &other) const
 Return true, if this pstring object designates the same file system element than that other designates.
std::string limitedPath (size_t sizeLimitHint) const
 Return a string designating this pstring object's name limited to sizeLimitHint characters, if possible.

Static Public Attributes

static const char nativeSeparator
 Native path separator. This is '\' on Windows and '/' else.
static const char * allowedSeparators
 Allowed path separators. This os "\\/" on Windows and "/" else.

Constructor & Destructor Documentation

stm::pstring::pstring ( const std::string &  path = std::string()  ) 

Constructs a pstring representing path.

stm::pstring::pstring ( const char *  path  ) 

Constructs a pstring representing path.


Member Function Documentation

bool stm::pstring::isContainedIn ( const std::string &  dir  )  const

Return true, if this pstring object designates the same file system element than that dir designates, or if the file system element designated by dir is a directory and this pstring object designates a file system element contained in the tree spanned by the directory designated by dir.

bool stm::pstring::designatesSame ( const std::string &  other  )  const

Return true, if this pstring object designates the same file system element than that other designates.

std::string stm::pstring::limitedPath ( size_t  sizeLimitHint  )  const

Return a string designating this pstring object's name limited to sizeLimitHint characters, if possible.


Member Data Documentation

const char stm::pstring::nativeSeparator [static]

Native path separator. This is '\' on Windows and '/' else.

Definition at line 154 of file filesysaids.hpp.

const char* stm::pstring::allowedSeparators [static]

Allowed path separators. This os "\\/" on Windows and "/" else.

Definition at line 157 of file filesysaids.hpp.


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).