Lines Matching full:code

9 specific to the Zephyr RTOS project (ex. code samples).
14 - ``zephyr:code-sample::`` - Defines a code sample.
15 - ``zephyr:code-sample-category::`` - Defines a category for grouping code samples.
16 - ``zephyr:code-sample-listing::`` - Shows a listing of code samples found in a given category.
23 - ``:zephyr:code-sample:`` - References a code sample.
24 - ``:zephyr:code-sample-category:`` - References a code sample category.
101 Transforms a `CodeSampleNode` into a `nodes.section` named after the code sample name.
125 Browse source code on GitHub
174 # the code sample.
289 docname = self.env.domaindata["zephyr"]["code-samples-categories"][tree.category["id"]][
307 # one code sample in the category)
310 for code_sample in self.env.domaindata["zephyr"]["code-samples"].values()
319 for code_sample in self.env.domaindata["zephyr"]["code-samples"].values()
332 classes=["code-sample-link"],
348 code_samples_categories_tree = self.env.domaindata["zephyr"]["code-samples-categories-tree"]
385 for code_sample in self.env.domaindata["zephyr"]["code-samples"].values()
401 code_samples_categories = self.env.domaindata["zephyr"]["code-samples-categories"]
403 "code-samples-categories-tree"
407 container["classes"].append("code-sample-listing")
415 placeholder="Filter code samples..." onkeyup="filterSamples(this)">
426 f"Category {category} not found in code samples categories",
443 Creates a bullet list (`nodes.bullet_list`) of code samples from a list of code samples.
445 The list is alphabetically sorted (case-insensitive) by the code sample name.
448 ul = nodes.bullet_list(classes=["code-sample-list"])
456 reftype="code-sample",
461 li += nodes.inline("", "", sample_xref, classes=["code-sample-name"])
465 classes=["code-sample-description"],
480 # want to list related code samples
482 code_samples = self.env.domaindata["zephyr"]["code-samples"].values()
483 # Filter out code samples that don't reference this doxygen group
490 admonition += nodes.title(text="Related code samples")
491 admonition["classes"].append("related-code-samples")
501 # remove node if there are no code samples
507 A directive for creating a code sample node in the Zephyr documentation.
518 code_samples = env.domaindata["zephyr"]["code-samples"]
522 f"Code sample {code_sample_id} already exists. "
590 # Fake a toctree directive to ensure the code-sample-category directive implicitly acts as
710 "code-sample": XRefRole(innernodeclass=nodes.inline, warn_dangling=True),
711 "code-sample-category": XRefRole(innernodeclass=nodes.inline, warn_dangling=True),
716 "code-sample": CodeSampleDirective,
717 "code-sample-listing": CodeSampleListingDirective,
718 "code-sample-category": CodeSampleCategoryDirective,
724 "code-sample": ObjType("code sample", "code-sample"),
725 "code-sample-category": ObjType("code sample category", "code-sample-category"),
730 "code-samples": {}, # id -> code sample data
731 "code-samples-categories": {}, # id -> code sample category data
732 "code-samples-categories-tree": Node("samples"),
739 self.data["code-samples"] = {
741 for sample_id, sample_data in self.data["code-samples"].items()
745 self.data["code-samples-categories"] = {
747 for category_id, category_data in self.data["code-samples-categories"].items()
757 self.data["code-samples"].update(otherdata["code-samples"])
758 self.data["code-samples-categories"].update(otherdata["code-samples-categories"])
769 other_tree = otherdata["code-samples-categories-tree"]
789 for _, code_sample in self.data["code-samples"].items():
793 "code-sample",
799 for _, code_sample_category in self.data["code-samples-categories"].items():
803 "code-sample-category",
823 for _, code_sample in self.data["code-samples"].items():
830 if type == "code-sample":
831 elem = self.data["code-samples"].get(target)
832 elif type == "code-sample-category":
833 elem = self.data["code-samples-categories"].get(target)
849 elem["description"].astext() if type == "code-sample" else None,
853 self.data["code-samples"][code_sample["id"]] = code_sample
856 self.data["code-samples-categories"][code_sample_category["id"]] = code_sample_category
868 tree = self.data["code-samples-categories-tree"]
879 f"Can't add code sample category {category_id} as category "
913 code_samples = domain.data["code-samples"]
915 category_tree = env.domaindata["zephyr"]["code-samples-categories-tree"]