GDCM
2.2.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
Source
Common
gdcmFilename.h
Go to the documentation of this file.
1
/*=========================================================================
2
3
Program: GDCM (Grassroots DICOM). A DICOM library
4
5
Copyright (c) 2006-2011 Mathieu Malaterre
6
All rights reserved.
7
See Copyright.txt or http://gdcm.sourceforge.net/Copyright.html for details.
8
9
This software is distributed WITHOUT ANY WARRANTY; without even
10
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11
PURPOSE. See the above copyright notice for more information.
12
13
=========================================================================*/
14
#ifndef GDCMFILENAME_H
15
#define GDCMFILENAME_H
16
17
#include "
gdcmTypes.h
"
18
19
#include <string>
20
21
namespace
gdcm
22
{
27
class
GDCM_EXPORT
Filename
28
{
29
public
:
30
Filename
(
const
char
* filename =
""
):FileName(filename ? filename :
""
),Path(),Conversion() {}
31
33
const
char
*
GetFileName
()
const
{
return
FileName.c_str(); }
35
const
char
*GetPath();
37
const
char
*GetName();
39
const
char
*GetExtension();
41
const
char
*ToUnixSlashes();
43
const
char
*ToWindowsSlashes();
44
47
static
const
char
*Join(
const
char
*path,
const
char
*filename);
48
50
bool
IsEmpty
()
const
{
return
FileName.empty(); }
51
55
operator
const
char
* ()
const
{
return
GetFileName(); }
56
57
// FIXME: I don't like this function
58
// It hides the realpath call (maybe usefull)
59
// and it forces file to exist on the disk whereas Filename
60
// should be independant from file existence.
61
bool
IsIdentical(
Filename
const
&fn)
const
;
62
63
private
:
64
std::string FileName;
65
std::string Path;
66
std::string Conversion;
67
};
68
69
}
// end namespace gdcm
70
71
#endif //GDCMFILENAME_H
Generated on Wed Jun 13 2012 20:40:37 for GDCM by
1.8.1