DCMTK
Version 3.6.6
OFFIS DICOM Toolkit
|
class for managing filenames consisting either of conventional (8-bit) or wide (e.g. 16-bit) characters. More...
Public Member Functions | |
OFFilename () | |
default constructor | |
OFFilename (const char *filename, const OFBool convert=OFFalse) | |
constructor expecting a conventional character string More... | |
OFFilename (const OFString &filename, const OFBool convert=OFFalse) | |
constructor expecting a character string as an OFString instance More... | |
OFFilename (const OFpath &path, const OFBool convert=OFFalse) | |
constructor expecting an OFpath instance More... | |
OFFilename (const wchar_t *filename, const OFBool convert=OFTrue) | |
constructor expecting a wide character string More... | |
OFFilename (const OFFilename &arg) | |
copy constructor More... | |
~OFFilename () | |
destructor. More... | |
OFFilename & | operator= (const OFFilename &arg) |
assignment operator More... | |
void | clear () |
clear currently stored filename | |
void | swap (OFFilename &arg) |
fast, non-throwing swap function. More... | |
OFBool | isEmpty () const |
checks whether this object stores an empty filename More... | |
OFBool | usesWideChars () const |
checks whether this object stores a wide character filename More... | |
const char * | getCharPointer () const |
get stored filename consisting of conventional characters More... | |
const wchar_t * | getWideCharPointer () const |
get stored filename consisting of wide characters More... | |
void | set (const char *filename, const OFBool convert=OFFalse) |
replace currently stored filename by given value More... | |
void | set (const OFString &filename, const OFBool convert=OFFalse) |
replace currently stored filename by given value More... | |
void | set (const OFpath &path, const OFBool convert=OFFalse) |
replace currently stored filename by given value More... | |
void | set (const wchar_t *filename, const OFBool convert=OFTrue) |
replace currently stored filename by given value More... | |
Private Attributes | |
char * | filename_ |
filename consisting of conventional characters (8-bit, e.g. UTF-8) | |
wchar_t * | wfilename_ |
filename consisting of wide characters (e.g. More... | |
class for managing filenames consisting either of conventional (8-bit) or wide (e.g. 16-bit) characters.
The wide character support is currently Windows-specific because most other operating systems use UTF-8, which is compatible with conventional 8-bit character strings.
OFFilename::OFFilename | ( | const char * | filename, |
const OFBool | convert = OFFalse |
||
) |
constructor expecting a conventional character string
filename | filename to be stored (8-bit characters, e.g. UTF-8) |
convert | convert given filename to wide character encoding as an alternative representation. Only works on Windows systems. |
OFFilename::OFFilename | ( | const OFString & | filename, |
const OFBool | convert = OFFalse |
||
) |
constructor expecting a character string as an OFString instance
filename | filename to be stored (8-bit characters, e.g. UTF-8) |
convert | convert given filename to wide character encoding as an alternative representation. Only works on Windows systems. |
OFFilename::OFFilename | ( | const OFpath & | path, |
const OFBool | convert = OFFalse |
||
) |
OFFilename::OFFilename | ( | const wchar_t * | filename, |
const OFBool | convert = OFTrue |
||
) |
constructor expecting a wide character string
filename | filename to be stored (e.g. 16-bit characters) |
convert | convert given filename to UTF-8 encoding as an alternative representation. Only works on Windows systems. |
OFFilename::OFFilename | ( | const OFFilename & | arg | ) |
copy constructor
arg | filename object to be copied |
OFFilename::~OFFilename | ( | ) |
destructor.
Frees memory.
|
inline |
get stored filename consisting of conventional characters
|
inline |
get stored filename consisting of wide characters
OFBool OFFilename::isEmpty | ( | ) | const |
checks whether this object stores an empty filename
OFFilename& OFFilename::operator= | ( | const OFFilename & | arg | ) |
assignment operator
arg | filename object to be copied |
void OFFilename::set | ( | const char * | filename, |
const OFBool | convert = OFFalse |
||
) |
replace currently stored filename by given value
filename | filename to be stored (8-bit characters, e.g. UTF-8) |
convert | convert given filename to wide character encoding as an alternative representation. Only works on Windows systems. |
void OFFilename::set | ( | const OFpath & | path, |
const OFBool | convert = OFFalse |
||
) |
void OFFilename::set | ( | const OFString & | filename, |
const OFBool | convert = OFFalse |
||
) |
replace currently stored filename by given value
filename | filename to be stored (8-bit characters, e.g. UTF-8) |
convert | convert given filename to wide character encoding as an alternative representation). Only works on Windows systems. |
void OFFilename::set | ( | const wchar_t * | filename, |
const OFBool | convert = OFTrue |
||
) |
replace currently stored filename by given value
filename | filename to be stored (e.g. 16-bit characters) |
convert | convert given filename to UTF-8 encoding as an alternative representation. Only works on Windows systems. |
void OFFilename::swap | ( | OFFilename & | arg | ) |
fast, non-throwing swap function.
The time complexity of this function is constant.
arg | filename object to swap with |
|
inline |
checks whether this object stores a wide character filename
|
private |
filename consisting of wide characters (e.g.
16-bit on Windows)