blob: ee21f2db26cb4c5fca52bfb15e045271af0f7012 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//=======================================================================================//
#ifndef MANAGERTEST_H
#define MANAGERTEST_H
#ifdef _WIN32
#pragma once
#endif
//----------------------------------------------------------------------------------------
#include "genericpersistentmanager.h"
#include "replay/replayhandle.h"
#include "replay/irecordingsessionblockmanager.h"
#include "utlstring.h"
#include "baserecordingsession.h"
#include "replay/basereplayserializeable.h"
#include "baserecordingsessionblock.h"
//----------------------------------------------------------------------------------------
class CTestObj : public CBaseReplaySerializeable
{
typedef CBaseReplaySerializeable BaseClass;
public:
CTestObj();
~CTestObj();
virtual const char *GetSubKeyTitle() const;
virtual const char *GetPath() const;
virtual void OnDelete();
virtual bool Read( KeyValues *pIn );
virtual void Write( KeyValues *pOut );
CUtlString m_strTest;
int m_nTest;
int *m_pTest;
};
//----------------------------------------------------------------------------------------
class ITestManager : public IBaseInterface
{
public:
virtual void SomeTest() = 0;
};
//----------------------------------------------------------------------------------------
class CTestManager : public CGenericPersistentManager< CTestObj >,
public ITestManager
{
typedef CGenericPersistentManager< CTestObj > BaseClass;
public:
CTestManager();
static void Test();
//
// CGenericPersistentManager
//
virtual CTestObj *Create();
virtual bool ShouldSerializeToIndividualFiles() const { return true; }
virtual const char *GetIndexPath() const;
virtual const char *GetDebugName() const { return "test manager"; }
virtual int GetVersion() const;
virtual const char *GetIndexFilename() const { return "test_index." GENERIC_FILE_EXTENSION; }
//
// ITestManager
//
virtual void SomeTest() {}
};
//----------------------------------------------------------------------------------------
#endif // MANAGERTEST_H
|