initial implementation of data packs

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40490
This commit is contained in:
Borja Ferrer
2007-02-13 16:11:04 +00:00
parent fbeabce6bf
commit 1ff370b91d
8 changed files with 597 additions and 16 deletions
+8 -2
View File
@@ -70,7 +70,8 @@ namespace SourceMod
virtual float ReadFloat() const =0;
/**
* @brief Returns whether or not a specified number of bytes can be read.
* @brief Returns whether or not a specified number of bytes from the current stream
* position to the end can be read.
*
* @param bytes Number of bytes to simulate reading.
* @return True if can be read, false otherwise.
@@ -94,11 +95,16 @@ namespace SourceMod
};
/**
* @brief Specifices a data pack that can only be written.
* @brief Specifies a data pack that can only be written.
*/
class IDataPack : public IDataReader
{
public:
/**
* @brief Resets the used size of the stream back to zero.
*/
virtual void ResetSize() =0;
/**
* @brief Packs one cell into the data stream.
*
+4 -5
View File
@@ -24,6 +24,7 @@
#include <IShareSys.h>
#include <sp_vm_api.h>
#include <IDataPack.h>
#define SMINTERFACE_SOURCEMOD_NAME "ISourceMod"
#define SMINTERFACE_SOURCEMOD_VERSION 1
@@ -42,7 +43,7 @@ namespace SourceMod
};
/**
* @brief Contains miscellanious helper functions.
* @brief Contains miscellaneous helper functions.
*/
class ISourceMod : public SMInterface
{
@@ -61,14 +62,14 @@ namespace SourceMod
*
* @return A string containing the full mod path.
*/
virtual const char *GetModPath() =0;
virtual const char *GetModPath() const =0;
/**
* @brief Returns the full path to the SourceMod directory.
*
* @return A string containing the full SourceMod path.
*/
virtual const char *GetSourceModPath() =0;
virtual const char *GetSourceModPath() const =0;
/**
* @brief Builds a platform path for a specific target base path.
@@ -117,7 +118,6 @@ namespace SourceMod
const cell_t *params,
unsigned int param) =0;
#if 0
/**
* @brief Creates a data pack object.
*
@@ -144,7 +144,6 @@ namespace SourceMod
* @return The Handle type for storing generic data packs.
*/
virtual HandleType_t GetDataPackHandleType(bool readonly=false) =0;
#endif
};
}