summaryrefslogtreecommitdiff
path: root/Runtime/Misc/ComponentRequirement.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Misc/ComponentRequirement.h')
-rw-r--r--Runtime/Misc/ComponentRequirement.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/Runtime/Misc/ComponentRequirement.h b/Runtime/Misc/ComponentRequirement.h
new file mode 100644
index 0000000..50f3dde
--- /dev/null
+++ b/Runtime/Misc/ComponentRequirement.h
@@ -0,0 +1,33 @@
+#ifndef COMPONENTREQUIREMENT_H
+#define COMPONENTREQUIREMENT_H
+#include "Runtime/Utilities/vector_set.h"
+#include <string>
+#include <map>
+#include <list>
+#include <vector>
+
+// Returns all components that are required for a component
+// of componentClassID to run.
+const vector_set<int>& FindRequiredComponentsForComponent (int componentClassID);
+void FindAllRequiredComponentsRecursive (int componentClassID, vector_set<int>& results);
+const vector_set<int>& FindConflictingComponents (int classID);
+
+// Can the component with componentClassID, be more than once in a gameobject?
+bool DoesComponentAllowMultipleInclusion (int componentClassID);
+
+struct GOComponentDescription
+{
+ int classID;
+ std::string name;
+ GOComponentDescription (const std::string& inName, int inClassID) { name = inName; classID = inClassID; }
+};
+
+typedef std::list<std::pair<std::string, std::vector<GOComponentDescription> > > ComponentsHierarchy;
+// Returns a sorted hierarchy of components
+const ComponentsHierarchy& GetComponentsHierarchy ();
+
+int GetAllowComponentReplacementClass (int classID);
+
+void InitComponentRequirements ();
+
+#endif