arsa  2.7
Public Member Functions | Protected Member Functions | List of all members
irr::io::SNamedPath Struct Reference

Used in places where we identify objects by a filename, but don't actually work with the real filename. More...

#include <path.h>

Public Member Functions

 SNamedPath ()
 Constructor. More...
 
 SNamedPath (const path &p)
 Constructor. More...
 
bool operator< (const SNamedPath &other) const
 Is smaller comparator. More...
 
void setPath (const path &p)
 Set the path. More...
 
const pathgetPath () const
 Get the path. More...
 
const pathgetInternalName () const
 
 operator core::stringc () const
 Implicit cast to io::path. More...
 
 operator core::stringw () const
 Implicit cast to io::path. More...
 

Protected Member Functions

path PathToName (const path &p) const
 

Detailed Description

Used in places where we identify objects by a filename, but don't actually work with the real filename.

Irrlicht is internally not case-sensitive when it comes to names. Also this class is a first step towards support for correctly serializing renamed objects.

Definition at line 23 of file path.h.

Constructor & Destructor Documentation

◆ SNamedPath() [1/2]

irr::io::SNamedPath::SNamedPath ( )
inline

Constructor.

Definition at line 26 of file path.h.

26 {}

◆ SNamedPath() [2/2]

irr::io::SNamedPath::SNamedPath ( const path p)
inline

Constructor.

Definition at line 29 of file path.h.

29  : Path(p), InternalName( PathToName(p) )
30  {
31  }
GLfloat GLfloat p
path PathToName(const path &p) const
Definition: path.h:72

Member Function Documentation

◆ getInternalName()

const path& irr::io::SNamedPath::getInternalName ( ) const
inline

Get the name which is used to identify the file. This string is similar to the names and filenames used before Irrlicht 1.7

Definition at line 54 of file path.h.

55  {
56  return InternalName;
57  }

◆ getPath()

const path& irr::io::SNamedPath::getPath ( ) const
inline

Get the path.

Definition at line 47 of file path.h.

48  {
49  return Path;
50  };

◆ operator core::stringc()

irr::io::SNamedPath::operator core::stringc ( ) const
inline

Implicit cast to io::path.

Definition at line 60 of file path.h.

61  {
62  return core::stringc(getPath());
63  }
string< c8 > stringc
Typedef for character strings.
Definition: irrString.h:1458
const path & getPath() const
Get the path.
Definition: path.h:47

◆ operator core::stringw()

irr::io::SNamedPath::operator core::stringw ( ) const
inline

Implicit cast to io::path.

Definition at line 65 of file path.h.

66  {
67  return core::stringw(getPath());
68  }
const path & getPath() const
Get the path.
Definition: path.h:47
string< wchar_t > stringw
Typedef for wide character strings.
Definition: irrString.h:1461

◆ operator<()

bool irr::io::SNamedPath::operator< ( const SNamedPath other) const
inline

Is smaller comparator.

Definition at line 34 of file path.h.

35  {
36  return InternalName < other.InternalName;
37  }

◆ PathToName()

path irr::io::SNamedPath::PathToName ( const path p) const
inlineprotected

Definition at line 72 of file path.h.

73  {
74  path name(p);
75  name.replace( '\\', '/' );
76  name.make_lower();
77  return name;
78  }
GLfloat GLfloat p
GLuint const GLchar * name
GLsizei const GLchar *const * path

◆ setPath()

void irr::io::SNamedPath::setPath ( const path p)
inline

Set the path.

Definition at line 40 of file path.h.

41  {
42  Path = p;
43  InternalName = PathToName(p);
44  }
GLfloat GLfloat p
path PathToName(const path &p) const
Definition: path.h:72

The documentation for this struct was generated from the following file: