Public Member Functions | Private Member Functions | Private Attributes | Friends
karto::Identifier Class Reference

#include <Identifier.h>

List of all members.

Public Member Functions

void Clear ()
const StringGetName () const
const StringGetScope () const
 Identifier ()
 Identifier (const char *pString)
 Identifier (const String &rString)
 Identifier (const Identifier &rOther)
kt_bool operator!= (const Identifier &rOther) const
kt_bool operator< (const Identifier &rOther) const
Identifieroperator= (const Identifier &rOther)
kt_bool operator== (const Identifier &rOther) const
void SetName (const String &pName)
void SetScope (const String &rScope)
kt_size_t Size () const
const StringToString () const
virtual ~Identifier ()

Private Member Functions

kt_bool IsValid (char c)
kt_bool IsValidFirst (char c)
void Parse (const String &rString)
void Update ()
void Validate (const String &rString)

Private Attributes

String m_FullName
String m_Name
String m_Scope

Friends

KARTO_FORCEINLINE std::ostream & operator<< (std::ostream &rStream, const Identifier &rIdentifier)

Detailed Description

Identifier class for karto resources.

Example of valid identifiers: 'Test' -- no scope '/Test' -- no scope; will be parsed to 'Test' '/scope/Test' - 'scope' scope and 'Test' name '/scope/name/Test' - 'scope/name' scope and 'Test' name

Definition at line 40 of file Identifier.h.


Constructor & Destructor Documentation

Empty name

Definition at line 24 of file Identifier.cpp.

karto::Identifier::Identifier ( const char *  pString)

Constructs an identifier from a const char*

Parameters:
pStringidentifier const char*

Definition at line 28 of file Identifier.cpp.

karto::Identifier::Identifier ( const String rString)

Constructs an identifier from a String

Parameters:
rStringidentifier string

Definition at line 33 of file Identifier.cpp.

Copy constructor

Definition at line 38 of file Identifier.cpp.

Destructor

Definition at line 43 of file Identifier.cpp.


Member Function Documentation

Clears this identifier

Definition at line 98 of file Identifier.cpp.

Gets the name of this identifier

Returns:
name

Definition at line 47 of file Identifier.cpp.

Gets the scope of this identifier

Returns:
scope

Definition at line 74 of file Identifier.cpp.

kt_bool karto::Identifier::IsValid ( char  c) [inline, private]

Whether the character is a valid character (alphanumeric, /, _, or -)

Parameters:
ccharacter
Returns:
true if the character is valid

Definition at line 179 of file Identifier.h.

kt_bool karto::Identifier::IsValidFirst ( char  c) [inline, private]

Whether the character is valid as a first character (alphanumeric or /)

Parameters:
ccharacter
Returns:
true if the character is a valid first character

Definition at line 169 of file Identifier.h.

kt_bool karto::Identifier::operator!= ( const Identifier rOther) const [inline]

Inequality operator

Definition at line 126 of file Identifier.h.

kt_bool karto::Identifier::operator< ( const Identifier rOther) const

Less than operator (An identifier is 'less than' another identifier if it is lexicographically 'less' than the other identifier.)

Definition at line 193 of file Identifier.cpp.

Identifier & karto::Identifier::operator= ( const Identifier rOther)

Assignment operator

Definition at line 176 of file Identifier.cpp.

kt_bool karto::Identifier::operator== ( const Identifier rOther) const

Equality operator

Definition at line 188 of file Identifier.cpp.

void karto::Identifier::Parse ( const String rString) [private]

Parse the given string into an identifier

Parameters:
rStringstring

Definition at line 105 of file Identifier.cpp.

void karto::Identifier::SetName ( const String pName)

Sets the name

Parameters:
pNamename

Definition at line 52 of file Identifier.cpp.

void karto::Identifier::SetScope ( const String rScope)

Sets the scope of this identifier

Parameters:
rScopenew scope

Definition at line 79 of file Identifier.cpp.

Gets the size of the identifier (scope and name)

Returns:
size of the identifier (scope and name)

Definition at line 198 of file Identifier.cpp.

Returns a string representation of this identifier

Returns:
string representation of this identifier

Definition at line 93 of file Identifier.cpp.

void karto::Identifier::Update ( ) [private]

Formats the identifier

Definition at line 163 of file Identifier.cpp.

void karto::Identifier::Validate ( const String rString) [private]

Validates the given string as an identifier

Parameters:
rStringstring

Definition at line 136 of file Identifier.cpp.


Friends And Related Function Documentation

KARTO_FORCEINLINE std::ostream& operator<< ( std::ostream &  rStream,
const Identifier rIdentifier 
) [friend]

Writes this identifier onto the output stream

Definition at line 140 of file Identifier.h.


Member Data Documentation

Definition at line 187 of file Identifier.h.

Definition at line 185 of file Identifier.h.

Definition at line 186 of file Identifier.h.


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


nav2d_karto
Author(s): Sebastian Kasperski
autogenerated on Mon Oct 6 2014 02:44:18