Drag[en]gine Game Engine  1.0
decUnicodeArgumentList Class Reference

Manages argument list with unicode strings. More...

#include <decUnicodeArgumentList.h>

Public Member Functions

Constructors and Destructors
 decUnicodeArgumentList ()
 ~decUnicodeArgumentList ()
int GetArgumentCount () const
const decUnicodeStringGetArgumentAt (int index) const
void AddArgument (const decUnicodeString &argument)
bool MatchesArgumentAt (int index, const char *string) const
void RemoveAllArguments ()
void ParseCommand (const decUnicodeString &command)

Detailed Description

Manages argument list with unicode strings.

Provides support to parse unicode strings into an argument list using common separation schemas. Easy to use for obtaining commands in unicode format and turning them into a simple to use argument list.

Pl├╝ss Roland

Constructor & Destructor Documentation

◆ decUnicodeArgumentList()

decUnicodeArgumentList::decUnicodeArgumentList ( )

Creates a new empty argument list object.

◆ ~decUnicodeArgumentList()

decUnicodeArgumentList::~decUnicodeArgumentList ( )

Frees the argument list object.

Member Function Documentation

◆ AddArgument()

void decUnicodeArgumentList::AddArgument ( const decUnicodeString argument)

Adds an argument to the end of the list.

Referenced by GetArgumentCount().

◆ GetArgumentAt()

const decUnicodeString* decUnicodeArgumentList::GetArgumentAt ( int  index) const

Retrieves the argument at the given index.

Referenced by GetArgumentCount().

◆ GetArgumentCount()

int decUnicodeArgumentList::GetArgumentCount ( ) const

Retrieves the number of arguments.

References AddArgument(), GetArgumentAt(), MatchesArgumentAt(), ParseCommand(), and RemoveAllArguments().

◆ MatchesArgumentAt()

bool decUnicodeArgumentList::MatchesArgumentAt ( int  index,
const char *  string 
) const

Determines if the given argument matches the provided utf8 string.

Referenced by GetArgumentCount().

◆ ParseCommand()

void decUnicodeArgumentList::ParseCommand ( const decUnicodeString command)

Parses command line passed into arguments which are then added to the end of the list. Arguments are considered separated by a white space. Quoted text strings are considered one argument. This function is present for operating systems not providing an entry point function which already splits up the arguments.

Referenced by GetArgumentCount().

◆ RemoveAllArguments()

void decUnicodeArgumentList::RemoveAllArguments ( )

Removes all arguments.

Referenced by GetArgumentCount().

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