YAPOG  0.0.1
Yet Another Pokemon Online Game
yap::Path Class Reference

Hanles string paths. More...

#include <Path.hpp>

Collaboration diagram for yap::Path:

List of all members.

Public Member Functions

 Path (const String &value)
 Initializes this Path with value.
 Path (const Path &copy)
 Initializes this Path from copy.
Pathoperator= (const Path &copy)
 Initializes this Path from copy.
bool operator< (const Path &right) const
 Compares the inferiority of this Path by right. For associative key containers handling.
PathConcat (const Path &path)
 Appends path to this Path. Adds a separator character ('/' by default) if this Path does not end by that character.
PathConcat (const String &value)
 Appends value to this Path. Does not add any separator character.
const StringGetValue () const
 Gets the underlying String value of this Path.

Static Public Member Functions

static Path Concat (const Path &left, const Path &right)
 Appends right to left.
static Path Concat (const Path &left, const String &right)
 Appends right to left.

Private Attributes

String value_
 Value of this Path.

Static Private Attributes

static const char DEFAULT_SEPARATOR = '/'
 Separator to use in case of the contatenation of Path.

Detailed Description

Hanles string paths.

Definition at line 10 of file Path.hpp.


Constructor & Destructor Documentation

yap::Path::Path ( const String value)
explicit

Initializes this Path with value.

Parameters:
valueValue this Path contains.

Definition at line 7 of file Path.cpp.

yap::Path::Path ( const Path copy)

Initializes this Path from copy.

Parameters:
copyPath from which to initialize this Path.

Definition at line 12 of file Path.cpp.


Member Function Documentation

Path & yap::Path::Concat ( const Path path)

Appends path to this Path. Adds a separator character ('/' by default) if this Path does not end by that character.

Parameters:
pathPath to append to this Path.

Definition at line 32 of file Path.cpp.

Here is the caller graph for this function:

Path & yap::Path::Concat ( const String value)

Appends value to this Path. Does not add any separator character.

Parameters:
valueString to append to this Path.

Definition at line 47 of file Path.cpp.

Path yap::Path::Concat ( const Path left,
const Path right 
)
static

Appends right to left.

Parameters:
leftPath from which to append right.
rightPath to append to left.

Definition at line 54 of file Path.cpp.

Path yap::Path::Concat ( const Path left,
const String right 
)
static

Appends right to left.

Parameters:
leftPath from which to append right.
rightString to append to left.

Definition at line 73 of file Path.cpp.

const String & yap::Path::GetValue ( ) const

Gets the underlying String value of this Path.

Returns:
Underlying value of this Path.

Definition at line 82 of file Path.cpp.

bool yap::Path::operator< ( const Path right) const

Compares the inferiority of this Path by right. For associative key containers handling.

Parameters:
rightPath to compare this Path with.

Definition at line 27 of file Path.cpp.

Path & yap::Path::operator= ( const Path copy)

Initializes this Path from copy.

Parameters:
copyPath from which to initialize this Path.

Definition at line 17 of file Path.cpp.


Member Data Documentation

const char yap::Path::DEFAULT_SEPARATOR = '/'
staticprivate

Separator to use in case of the contatenation of Path.

Definition at line 56 of file Path.hpp.

String yap::Path::value_
private

Value of this Path.

Definition at line 59 of file Path.hpp.


The documentation for this class was generated from the following files: