Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef NETWORKSTRINGTABLECONTAINERCLIENT_H
  8. #define NETWORKSTRINGTABLECONTAINERCLIENT_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. // #include "inetworkstringtableclient.h"
  13. #include "networkstringtabledefs.h"
  14. #include "netmessages.h"
  15. class CUtlBuffer;
  16. class CNetworkStringTable;
  17. //-----------------------------------------------------------------------------
  18. // Purpose: Client implementation of string list
  19. //-----------------------------------------------------------------------------
  20. class CNetworkStringTableContainerClient : public INetworkStringTableContainer
  21. {
  22. public:
  23. // Construction
  24. CNetworkStringTableContainerClient( void );
  25. ~CNetworkStringTableContainerClient( void );
  26. public:
  27. // implemenatation INetworkStringTableContainer
  28. virtual INetworkStringTable *CreateStringTable( const char *tableName, int maxentries );
  29. virtual void RemoveAllTables( void );
  30. virtual INetworkStringTable *FindTable( const char *tableName ) const;
  31. virtual INetworkStringTable *GetTable( TABLEID stringTable ) const;
  32. virtual int GetNumTables( void ) const;
  33. // Print contents to console
  34. void Dump( void );
  35. void WriteStringTables( CUtlBuffer& buf );
  36. bool ReadStringTables( CUtlBuffer& buf );
  37. private:
  38. CUtlVector < CNetworkStringTable* > m_Tables;
  39. };
  40. extern CNetworkStringTableContainerClient *networkStringTableContainerClient;
  41. #endif // NETWORKSTRINGTABLECONTAINERCLIENT_H