MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / ScriptEntityClass

Class ScriptEntityClass

plugins/script/interfaces/EClassInterface.h:15–54  ·  view source on GitHub ↗

* This class represents a single EntityDef / EntityClass for script. */

Source from the content-addressed store, hash-verified

13 * This class represents a single EntityDef / EntityClass for script.
14 */
15class ScriptEntityClass
16{
17 IEntityClassPtr _eclass;
18 EntityClassAttribute _emptyAttribute;
19
20public:
21 ScriptEntityClass(const IEntityClassPtr& eclass) :
22 _eclass(eclass),
23 _emptyAttribute("text", "", "")
24 {}
25
26 operator const IEntityClassPtr&() const
27 {
28 return _eclass;
29 }
30
31 // Returns a specific spawnarg value from this entityDef, or "" if not found
32 std::string getAttributeValue(const std::string& name)
33 {
34 if (!_eclass)
35 return {};
36 else
37 return _eclass->getAttributeValue(name);
38 }
39
40 bool isNull() const
41 {
42 return !_eclass;
43 }
44
45 bool isOfType(const std::string& className)
46 {
47 return !_eclass ? false : _eclass->isOfType(className);
48 }
49
50 std::string getDefFileName()
51 {
52 return _eclass ? _eclass->getDeclFilePath() : std::string();
53 }
54};
55
56class ScriptModelDef
57{

Callers 2

findClassMethod · 0.85
getEntityClassMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected