Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
SimpleStringCache.hpp
Go to the documentation of this file.
1//***********************************************************************************************
2//
3// Copyright (c) 1999 - 2002 Axon Instruments, Inc.
4// All rights reserved.
5//
6//***********************************************************************************************
7// MODULE: SimpleStringCache.HPP
8// PURPOSE:
9// AUTHOR: BHI Nov 1999
10// PRC May 2002
11
12// Simple String Cache class, based on StringCache.hpp / cpp
13//
14
15#ifndef INC_SIMPLESTRINGCACHE_HPP
16#define INC_SIMPLESTRINGCACHE_HPP
17
18#pragma once
19#include <vector>
20#pragma pack(push, 1)
21
22#pragma pack(pop)
23
24class CSimpleStringCache
25{
26private: // Attributes
27 // Typedefs to simplify code.
28
29 std::vector<LPCSTR> m_Cache;
30
31 UINT m_uMaxSize;
32
33private: // Unimplemented copy functions.
34 CSimpleStringCache(const CSimpleStringCache &);
35 const CSimpleStringCache &operator=(const CSimpleStringCache &);
36
37public: // Public interface
40
41 void Clear();
43 LPCSTR Get(UINT uIndex) const;
44
45 BOOL Write(HANDLE hFile, UINT &uOffset) const;
46 BOOL Read(HANDLE hFile, UINT uOffset);
47
49 UINT GetMaxSize() const { return m_uMaxSize; };
51
52};
53
54#endif // INC_SIMPLESTRINGCACHE_HPP
55
LPCSTR Get(UINT uIndex) const
UINT GetNumStrings() const
UINT Add(LPCSTR psz)
BOOL Write(HANDLE hFile, UINT &uOffset) const
UINT GetTotalSize() const
BOOL Read(HANDLE hFile, UINT uOffset)
int BOOL
Definition unix.h:49
unsigned int UINT
Definition unix.h:47
void * HANDLE
Definition unix.h:136
const CHAR * LPCSTR
Definition unix.h:94