MCPcopy
hub / github.com/SFTtech/openage / add_functionname

Method add_functionname

openage/codegen/cpp_testlist.py:22–35  ·  view source on GitHub ↗

Adds a function to the namespace. Path is the qualified function "path" (e.g., openage::test::foo) has the path ["openage", "test", "foo"]. Descends recursively, creating subnamespaces as required.

(self, path)

Source from the content-addressed store, hash-verified

20 self.functions = []
21
22 def add_functionname(self, path):
23 """
24 Adds a function to the namespace.
25
26 Path is the qualified function "path" (e.g., openage::test::foo)
27 has the path ["openage", "test", "foo"].
28
29 Descends recursively, creating subnamespaces as required.
30 """
31 if len(path) == 1:
32 self.functions.append(path[0])
33 else:
34 subnamespace = self.namespaces[path[0]]
35 subnamespace.add_functionname(path[1:])
36
37 def gen_prototypes(self):
38 """

Callers 1

generate_testlistFunction · 0.95

Calls 1

appendMethod · 0.45

Tested by

no test coverage detected