as_configgroup.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*
  2. AngelCode Scripting Library
  3. Copyright (c) 2003-2011 Andreas Jonsson
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any
  6. damages arising from the use of this software.
  7. Permission is granted to anyone to use this software for any
  8. purpose, including commercial applications, and to alter it and
  9. redistribute it freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you
  11. must not claim that you wrote the original software. If you use
  12. this software in a product, an acknowledgment in the product
  13. documentation would be appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and
  15. must not be misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source
  17. distribution.
  18. The original version of this library can be located at:
  19. http://www.angelcode.com/angelscript/
  20. Andreas Jonsson
  21. [email protected]
  22. */
  23. //
  24. // as_configgroup.h
  25. //
  26. // This class holds configuration groups for the engine
  27. //
  28. #ifndef AS_CONFIGGROUP_H
  29. #define AS_CONFIGGROUP_H
  30. #include "as_config.h"
  31. #include "as_string.h"
  32. #include "as_array.h"
  33. #include "as_objecttype.h"
  34. #ifdef AS_DEPRECATED
  35. // deprecated since 2011-10-04
  36. #include "as_map.h"
  37. #endif
  38. BEGIN_AS_NAMESPACE
  39. class asCConfigGroup
  40. {
  41. public:
  42. asCConfigGroup();
  43. ~asCConfigGroup();
  44. // Memory management
  45. int AddRef();
  46. int Release();
  47. asCObjectType *FindType(const char *obj);
  48. void RefConfigGroup(asCConfigGroup *group);
  49. bool HasLiveObjects();
  50. void RemoveConfiguration(asCScriptEngine *engine, bool notUsed = false);
  51. #ifdef AS_DEPRECATED
  52. // deprecated since 2011-10-04
  53. int SetModuleAccess(const char *module, bool hasAccess);
  54. bool HasModuleAccess(const char *module);
  55. #endif
  56. #ifdef AS_DEBUG
  57. void ValidateNoUsage(asCScriptEngine *engine, asCObjectType *type);
  58. #endif
  59. asCString groupName;
  60. int refCount;
  61. asCArray<asCObjectType*> objTypes;
  62. asCArray<asCScriptFunction*> scriptFunctions;
  63. asCArray<asCGlobalProperty*> globalProps;
  64. asCArray<asCConfigGroup*> referencedConfigGroups;
  65. asCArray<asCScriptFunction*> funcDefs;
  66. #ifdef AS_DEPRECATED
  67. // deprecated since 2011-10-04
  68. // Module access
  69. bool defaultAccess;
  70. asCMap<asCString, bool> moduleAccess;
  71. #endif
  72. };
  73. END_AS_NAMESPACE
  74. #endif