PageRenderTime 107ms CodeModel.GetById 100ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

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