This wiki was in read-only mode for many years, but can now be edited again. A lot of information will need to be updated.
Bz APIStringList: Difference between revisions
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.
Declaration
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
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
bz_ApiString get ( unsigned int i );
const bz_ApiString& operator[] (unsigned int i) const;
Parameters
- unsigned int i
 - bz_ApiString element to return
 
Functions
size
unsigned int size ( void );
Returns the number of elements on the list
clear
void clear ( void );
Removes all elements from the list
tokenize
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.