#include <msparse_array.h>
Definition at line 55 of file msparse_array.h.
Public Member Functions | |
int | deserialize (std::istream &in) throw (SerializationException) |
Replace the current object value from the bytes read from in , returning the number of bytes read. | |
void | serialize (std::string &str) const |
Encode the current object at the end of str as a bytestring in a compact format (and which doesn't require delimiters to parse). | |
const std::string & | getTypeName () const |
Return the template parameter string Key->Data for actual template parameters. (Mace extension). | |
bool | contains (size_type i) const |
check if the array has an element at position i | |
T & | operator[] (size_type place) |
return the data at position place , constructing one if needed | |
const T & | operator[] (size_type place) const |
return the data at position place , throwing an exception if not already there | |
void | erase (size_type i) |
erase the element in position i (does not change the size of the array) | |
size_type | count () const |
return the number of non-NULL elements in the array | |
T & | random (int *p=NULL) |
return a random (non-null) element, constructing one at position 0 if there are none. Sets the position of the element returned. | |
const T & | random (int *p=NULL) const |
return a random (non-null) element, throwing an exception if there are none. Sets the position of the element returned. |