Irrlicht 3D Engine
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
path.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2012 Nikolaus Gebhardt
2
// This file is part of the "Irrlicht Engine" and the "irrXML" project.
3
// For conditions of distribution and use, see copyright notice in irrlicht.h
4
5
#ifndef __IRR_PATH_H_INCLUDED__
6
#define __IRR_PATH_H_INCLUDED__
7
8
#include "
irrString.h
"
9
10
namespace
irr
11
{
12
namespace
io
13
{
14
16
17
typedef
core::string<fschar_t>
path
;
18
20
23
struct
SNamedPath
24
{
26
SNamedPath
() {}
27
29
SNamedPath
(
const
path
& p) : Path(p), InternalName(
PathToName
(p) )
30
{
31
}
32
34
bool
operator <
(
const
SNamedPath
& other)
const
35
{
36
return
InternalName < other.InternalName;
37
}
38
40
void
setPath
(
const
path
& p)
41
{
42
Path = p;
43
InternalName =
PathToName
(p);
44
}
45
47
const
path
&
getPath
()
const
48
{
49
return
Path;
50
};
51
54
const
path
&
getInternalName
()
const
55
{
56
return
InternalName;
57
}
58
60
operator
core::stringc
()
const
61
{
62
return
core::stringc
(
getPath
());
63
}
65
operator
core::stringw
()
const
66
{
67
return
core::stringw
(
getPath
());
68
}
69
70
protected
:
71
// convert the given path string to a name string.
72
path
PathToName
(
const
path
& p)
const
73
{
74
path
name(p);
75
name.
replace
(
'\\'
,
'/'
);
76
name.
make_lower
();
77
return
name;
78
}
79
80
private
:
81
path
Path;
82
path
InternalName;
83
};
84
85
}
// io
86
}
// irr
87
88
#endif // __IRR_PATH_H_INCLUDED__
Irrlicht Engine
Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Sun Apr 21 2019 20:57:28 for Irrlicht 3D Engine by
Doxygen
1.8.1.2