Counter Strike : Global Offensive Source Code
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.

57 lines
1.3 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Class data for an AI Concept, an atom of response-driven dialog.
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef RR_SPEECHCONCEPT_H
  8. #define RR_SPEECHCONCEPT_H
  9. #if defined( _WIN32 )
  10. #pragma once
  11. #endif
  12. #include "utlsymbol.h"
  13. #define RR_CONCEPTS_ARE_STRINGS 0
  14. typedef CUtlSymbolTable CRR_ConceptSymbolTable;
  15. namespace ResponseRules
  16. {
  17. class CRR_Concept
  18. {
  19. public: // local typedefs
  20. typedef CUtlSymbol tGenericId; // an int-like type that can be used to refer to all concepts of this type
  21. tGenericId m_iConcept;
  22. public:
  23. CRR_Concept() {};
  24. // construct concept from a string.
  25. CRR_Concept(const char *fromString);
  26. // Return as a string
  27. const char *GetStringConcept() const;
  28. static const char *GetStringForGenericId(tGenericId genericId);
  29. operator tGenericId() const { return m_iConcept; }
  30. operator const char *() const { return GetStringConcept(); }
  31. inline bool operator==(const CRR_Concept &other) // default is compare by concept ids
  32. {
  33. return m_iConcept == other.m_iConcept;
  34. }
  35. bool operator==(const char *pszConcept);
  36. protected:
  37. private:
  38. // dupe a concept
  39. // CRR_Concept& operator=(CRR_Concept &other);
  40. CRR_Concept& operator=(const char *fromString);
  41. };
  42. };
  43. #endif