/xbmc/visualizations/Vortex/angelscript/angelscript/source/as_configgroup.h

http://github.com/xbmc/xbmc · C++ Header · 89 lines · 35 code · 18 blank · 36 comment · 0 complexity · 20eaeddcbb14d8e699ee43e115d5cd9b MD5 · raw file

  1. /*
  2. AngelCode Scripting Library
  3. Copyright (c) 2003-2009 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. andreas@angelcode.com
  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. #include "as_map.h"
  35. BEGIN_AS_NAMESPACE
  36. class asCConfigGroup
  37. {
  38. public:
  39. asCConfigGroup();
  40. ~asCConfigGroup();
  41. // Memory management
  42. int AddRef();
  43. int Release();
  44. asCObjectType *FindType(const char *obj);
  45. void RefConfigGroup(asCConfigGroup *group);
  46. bool HasLiveObjects();
  47. void RemoveConfiguration(asCScriptEngine *engine);
  48. int SetModuleAccess(const char *module, bool hasAccess);
  49. bool HasModuleAccess(const char *module);
  50. #ifdef AS_DEBUG
  51. void ValidateNoUsage(asCScriptEngine *engine, asCObjectType *type);
  52. #endif
  53. asCString groupName;
  54. int refCount;
  55. asCArray<asCObjectType*> objTypes;
  56. asCArray<asCScriptFunction*> scriptFunctions;
  57. asCArray<asCGlobalProperty*> globalProps;
  58. asCArray<asCConfigGroup*> referencedConfigGroups;
  59. // Module access
  60. bool defaultAccess;
  61. asCMap<asCString, bool> moduleAccess;
  62. };
  63. END_AS_NAMESPACE
  64. #endif