}
/**
- * Allocates memory. Throws an exception if no memory is available. Alignment
- * guarantees are the same like for malloc().
+ * Allocates memory. Alignment guarantees are the same like for malloc().
*
* @param size The size of the requested memory block.
* @returns A new block of memory.
+ * @exception OutOfMemoryException No more memory is available.
*/
void *Memory::Allocate(size_t size)
{
}
/**
- * Resizes a block of memory. Throws an exception if no memory is available.
+ * Resizes a block of memory.
*
* @param ptr The old memory block or NULL.
* @param size The requested new size of the block.
* @returns A pointer to the new memory block.
+ * @exception OutOfMemoryException No more memory is available.
*/
void *Memory::Reallocate(void *ptr, size_t size)
{
}
/**
- * Duplicates a string. Throws an exception if no memory is available.
+ * Duplicates a string.
*
* @param str The string.
* @returns A copy of the string.
+ * @exception OutOfMemoryException No more memory is available.
*/
char *Memory::StrDup(const char *str)
{
DEFINE_EXCEPTION_CLASS(OutOfMemoryException);
/**
- * Singleton class which implements memory allocation helpers.
+ * Memory allocation helper functions.
*
* @ingroup base
*/
{
/**
- * Utility functions.
+ * Helper functions.
*
* @ingroup base
*/
public:
/**
- * Returns the type name of an object (using RTTI).
+ * Returns a human-readable type name of an object (using RTTI).
+ *
+ * @param value An object.
+ * @returns The type name of the object.
*/
template<class T>
static string GetTypeName(const T& value)
/**
* Creates a new JSON-RPC listener on the specified port.
*
- * @param service The name of the service to listen on (@see getaddrinfo).
+ * @param service The port to listen on.
*/
void EndpointManager::AddListener(string service)
{
/**
* Creates a new JSON-RPC client and connects to the specified host and port.
*
- * @param node The remote host (@see getaddrinfo).
- * @param service The remote port (@see getaddrinfo).
+ * @param node The remote host.
+ * @param service The remote port.
*/
void EndpointManager::AddConnection(string node, string service)
{
DEFINE_EXCEPTION_CLASS(InvalidNetstringException);
/**
- * Utility functions for reading/writing messages in the netstring format.
+ * Helper functions for reading/writing messages in the netstring format.
* See http://cr.yp.to/proto/netstrings.txt for details.
*
* @ingroup jsonrpc