DDNet documentation
Loading...
Searching...
No Matches
datafile.h File Reference
#include "uuid_manager.h"
#include <base/hash.h>
#include <base/types.h>
#include <engine/storage.h>
#include <cstdint>
#include <functional>
#include <map>
#include <vector>
Include dependency graph for datafile.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CDataFileReader
class  CDataFileWriter
class  CDataFileWriter::CDataInfo
class  CDataFileWriter::CItemInfo
class  CDataFileWriter::CItemTypeInfo
class  CDataFileWriter::CExtendedItemType

Typedefs

typedef std::function< std::pair< void *, size_t >(void *pData, size_t Size)> FDataProcessor

Enumerations

enum  { ITEMTYPE_EX = 0xFFFF }

Typedef Documentation

◆ FDataProcessor

typedef std::function<std::pair<void *, size_t>(void *pData, size_t Size)> FDataProcessor

The data processor function is called after a particular data item is first successfully uncompressed. The function can validate the data and return std::make_pair(nullptr, 0) on error or the original data on success. The function can also replace the data and return a new data pointer and size. The new data must be allocated with malloc. When returning different data or on errors, the original data must be freed by the function using free.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ITEMTYPE_EX