This wiki is archived and useful information is being migrated to the main bzflag.org website
Difference between revisions of "Bz APIStringList"
m (Bz APIStringList moved to BzAPIStringList: Name out-of-date) |
m (BzAPIStringList moved to Bz APIStringList over redirect: Undoing previous move...) |
(No difference)
|
Latest revision as of 01:55, 8 May 2009
BZFS API Documentation This page contains part of the BZFS API documentation for use by Plug-ins on the BZFS server. |
BZFS Class. This page documents a BZFS API class that is defined by the game server API. Plug-ins receive various classes in able to retrieve information about players and the game state from the server.
Contents
Declaration[edit]
class BZF_API bz_APIStringList { public: bz_APIStringList(); bz_APIStringList(const bz_APIStringList &r); bz_APIStringList(const std::vector<std::string> &r); ~bz_APIStringList(); void push_back ( const bz_ApiString &value ); void push_back ( const std::string &value ); bz_ApiString get ( unsigned int i ); const bz_ApiString& operator[] (unsigned int i) const; bz_APIStringList& operator= ( const bz_APIStringList &r ); bz_APIStringList& operator= ( const std::vector<std::string> &r ); unsigned int size ( void ); void clear ( void ); void tokenize ( const char* in, const char* delims, int maxTokens = 0, bool useQuotes = false); };
BZF_API bz_APIStringList* bz_newStringList ( void ); BZF_API void bz_deleteStringList( bz_APIStringList * l );
Description[edit]
Contains a list of strings. Comparable to std::vector<std::string>
Plugins generally should never create Bz_APIStringList objects, only copy the data out.
Member Access[edit]
bz_ApiString get ( unsigned int i );
const bz_ApiString& operator[] (unsigned int i) const;
Parameters[edit]
- unsigned int i
- bz_ApiString element to return
Functions[edit]
size[edit]
unsigned int size ( void );
Returns the number of elements on the list
clear[edit]
void clear ( void );
Removes all elements from the list
tokenize[edit]
void tokenize ( const char* in, const char* delims, int maxTokens = 0, bool useQuotes = false);
Appends a list generated from a tokenized string. Use of this function is discouraged, the tokenize() function available in plugin_utils is prefered.