mirror of
https://github.com/rehlds/metamod-r.git
synced 2025-01-03 18:45:36 +03:00
41 lines
1.0 KiB
C++
41 lines
1.0 KiB
C++
//========= Copyright © 1996-2001, Valve LLC, All rights reserved. ============
|
|
//
|
|
// Purpose:
|
|
//
|
|
// $NoKeywords: $
|
|
//=============================================================================
|
|
|
|
#if !defined( UTIL_REGISTRY_H )
|
|
#define UTIL_REGISTRY_H
|
|
#ifdef _WIN32
|
|
#pragma once
|
|
#endif
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: Interface to registry
|
|
//-----------------------------------------------------------------------------
|
|
class IRegistry
|
|
{
|
|
public:
|
|
// Init/shutdown
|
|
virtual void Init(void) = 0;
|
|
virtual void Shutdown(void) = 0;
|
|
|
|
// Read/write integers
|
|
virtual int ReadInt(const char *key, int defaultValue = 0) = 0;
|
|
virtual void WriteInt(const char *key, int value) = 0;
|
|
|
|
// Read/write strings
|
|
virtual const char *ReadString(const char *key, const char *defaultValue = NULL) = 0;
|
|
virtual void WriteString(const char *key, const char *value) = 0;
|
|
};
|
|
|
|
|
|
#ifdef HOOK_ENGINE
|
|
#define registry (*pregistry)
|
|
#endif // HOOK_ENGINE
|
|
|
|
extern IRegistry *registry;
|
|
|
|
#endif // UTIL_REGISTRY_H
|