1#ifndef COASTLINE_EAR_MFC_H
2#define COASTLINE_EAR_MFC_H
6#if TGR_PLATFORM == TGR_PLATFORM_WIN
43 virtual void Dump(CDumpContext &context)
const;
47typedef struct __POSITION {
114 Association **hashTable;
117 Association *freeAssociations;
193#if TGR_PLATFORM == TGR_PLATFORM_WIN
234#if defined(ENABLE_PATCHES) || !defined(_MSC_VER) || _MSC_VER > 1200
236 [[maybe_unused]]
char *fileName;
282 Association **hashTable;
285 Association *freeAssociations;
virtual void Write(const void *buffer, UINT count)
Attempt a synchronous write without reporting failure or a partial write.
~CFile() override
Close a file successfully opened through this wrapper.
CFile()
Initialise a wrapper without an open file.
virtual void Close()
Close the current file if open and reset the wrapper, discarding closure errors.
OpenFlags
Bit flags accepted by Open(); combinations select access and creation behaviour.
Definition mfc.h:200
@ modeWrite
Request write access rather than the default read access.
Definition mfc.h:202
@ typeBinary
Binary-mode compatibility flag; Windows byte operations require no conversion.
Definition mfc.h:206
@ modeCreate
Create a new file or truncate an existing file.
Definition mfc.h:204
virtual BOOL Open(LPCSTR fileName, UINT openFlags, CFileException *error=nullptr)
Open a Windows file with shared read and write access.
UINT GetHashTableSize() const
~CMapPtrToPtr() override
Release buckets and association pools without deleting key or value objects.
void InitHashTable(UINT hashSize, BOOL allocate=TRUE)
Replace bucket storage in an empty map without changing the association-pool configuration.
BOOL RemoveKey(void *key)
Remove an association and release all storage when the map becomes empty.
void SetAt(void *key, void *value)
Insert or replace a pointer without releasing the previous value.
CMapPtrToPtr(int blockSize=10)
Initialise an empty map with 17 buckets allocated on first insertion.
CMapWordToPtr(int blockSize=10)
Initialise an empty map with 17 buckets allocated on first insertion.
void GetNextAssoc(POSITION &position, WORD &key, void *&value) const
Retrieve an association in hash-bucket order and advance the cursor.
POSITION GetStartPosition() const
BOOL RemoveKey(WORD key)
Remove an association and release all storage when the map becomes empty.
~CMapWordToPtr() override
Release buckets and association pools without deleting pointer values.
void RemoveAll()
Release all associations and buckets without deleting pointer values.
void SetAt(WORD key, void *value)
Insert or replace a pointer without releasing the previous value.
UINT GetHashTableSize() const
void InitHashTable(UINT hashSize, BOOL allocate=TRUE)
Replace bucket storage in an empty map without changing the association-pool configuration.
BOOL Lookup(WORD key, void *&value) const
Look up a pointer without changing the output on a missing key.
Polymorphic MFC compatibility base with inactive serialisation and diagnostic hooks.
Definition mfc.h:26
virtual CRuntimeClass * GetRuntimeClass() const
virtual void AssertValid() const
Do not validate object state.
virtual void Serialize(CArchive &archive)
Do not serialise archive data.
virtual ~CObject()
The base destructor does not perform additional cleanup.
virtual void Dump(CDumpContext &context) const
Do not emit diagnostic output.
CWordList(int blockSize=10)
Initialise an empty list with node allocation deferred until insertion.
POSITION AddTail(WORD value)
Insert a value at the tail.
POSITION InsertAfter(POSITION position, WORD value)
Insert a value after a position, or at the tail for a null position.
POSITION InsertBefore(POSITION position, WORD value)
Insert a value before a position, or at the head for a null position.
void RemoveAt(POSITION position)
Remove a node and release all pool blocks when the list becomes empty.
~CWordList() override
Release all nodes and pool blocks.
POSITION AddHead(WORD value)
Insert a value at the head.
void RemoveAll()
Remove every node and release all pool blocks.
WORD & GetNext(POSITION &position)
Retrieve a node value and advance towards the tail.
POSITION GetHeadPosition() const
struct __POSITION * POSITION
Opaque container position representation; instances must not be dereferenced.
void * MfcAllocateWithNewHandler(std::size_t size)
Allocate uninitialised storage with the current new handler retried after allocation failure.
The integer and floating-point types of the console, for headers shared with Windows.
#define TRUE
Definition ultratypes.h:53