zuspec-dataclasses 0.0.1.6449650798__py2.py3-none-any.whl → 0.0.1.6449654181__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,65 @@
1
+ #****************************************************************************
2
+ #* collect_type_deps.py
3
+ #*
4
+ #* Copyright 2022 Matthew Ballance and Contributors
5
+ #*
6
+ #* Licensed under the Apache License, Version 2.0 (the "License"); you may
7
+ #* not use this file except in compliance with the License.
8
+ #* You may obtain a copy of the License at:
9
+ #*
10
+ #* http://www.apache.org/licenses/LICENSE-2.0
11
+ #*
12
+ #* Unless required by applicable law or agreed to in writing, software
13
+ #* distributed under the License is distributed on an "AS IS" BASIS,
14
+ #* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ #* See the License for the specific language governing permissions and
16
+ #* limitations under the License.
17
+ #*
18
+ #* Created on:
19
+ #* Author:
20
+ #*
21
+ #****************************************************************************
22
+ from vsc_dataclasses.impl.generators.collect_struct_deps import CollectStructDeps
23
+ from zsp_dataclasses.impl.context import DataTypeAction, DataTypeComponent
24
+ from ..pyctxt.visitor_base import VisitorBase
25
+
26
+ class CollectTypeDeps(VisitorBase,CollectStructDeps):
27
+
28
+ def __init__(self):
29
+ CollectStructDeps.__init__(self, None)
30
+
31
+ def collect(self, root_comp, root_action):
32
+ self._init()
33
+ self.addType(root_action)
34
+ self.push_scope(root_action)
35
+ self.addRef(root_comp)
36
+ self.pop_scope()
37
+ root_comp.accept(self)
38
+ root_action.accept(self)
39
+
40
+ return self._sort_deps()
41
+
42
+ def visitDataTypeAction(self, i: DataTypeAction):
43
+ if self.in_field():
44
+ self.addRef(i)
45
+ else:
46
+ self.addType(i)
47
+
48
+ self.push_scope(i)
49
+ for f in i.getFields():
50
+ f.accept(self)
51
+ # TODO: Activities
52
+ self.pop_scope()
53
+
54
+ def visitDataTypeComponent(self, i: DataTypeComponent):
55
+ if self.in_field():
56
+ self.addRef(i)
57
+ else:
58
+ self.addType(i)
59
+
60
+ self.push_scope(i)
61
+ for f in i.getFields():
62
+ f.accept(self)
63
+ self.pop_scope()
64
+
65
+
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: zuspec-dataclasses
3
- Version: 0.0.1.6449650798
3
+ Version: 0.0.1.6449654181
4
4
  Summary: Front-end for capturing Action Relation Level models using dataclasses
5
5
  Home-page: https://github.com/zuspec/zuspec-dataclasses
6
6
  Author: Matthew Ballance
@@ -94,6 +94,7 @@ zsp_dataclasses/impl/typeinfo_pure_component.py,sha256=5I8OIiL0tgRYkwlb2M8VfnPVg
94
94
  zsp_dataclasses/impl/typeinfo_reg_group.py,sha256=2kNSSPaxQnfxoxrHszBqUQ9vl1wtBBFfeOk7Q7hwCN8,1319
95
95
  zsp_dataclasses/impl/typeinfo_struct.py,sha256=JF-1NJGaNxgm6aTEkNHPEx230yMXExnORLlJIHe4KBI,333
96
96
  zsp_dataclasses/impl/generators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
97
+ zsp_dataclasses/impl/generators/collect_type_deps.py,sha256=EainOgsxfmBqOVVVj-XI6rkvRckrs1QMT2np90MNtjc,2035
97
98
  zsp_dataclasses/impl/generators/zsp_data_model_cpp_gen.py,sha256=0mza3RUPf31RjjIh4KbEgAEW4cAfN0CKZqFs-TWAFuc,14615
98
99
  zsp_dataclasses/impl/pyctxt/context.py,sha256=r3cOmGDzntKjg3ryY1oKWLGlp8O6UgbHHeDwBnt2ZMo,6096
99
100
  zsp_dataclasses/impl/pyctxt/core_lib_factory.py,sha256=9vpcDdlzVIOSixnSJuMFe6_wWpxeRV0nHnANxI1K5C4,1452
@@ -122,8 +123,8 @@ zsp_dataclasses/impl/pyctxt/visitor_base.py,sha256=n08-7Y5AOjBeuvZOLiAqvDh78Xsf4
122
123
  zsp_dataclasses/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
124
  zsp_dataclasses/util/extract_cpp_embedded_dsl.py,sha256=SyMMLumZD6fsubj40hyekYzWyrcoUGTijJH3NmK1ihY,5630
124
125
  zsp_dataclasses/util/gen_cpp_dt_defs/__main__.py,sha256=LdfPAEzhMPtW1Ie15A5pmYAlL8DQFj-l7Pbey3EJiJg,3391
125
- zuspec_dataclasses-0.0.1.6449650798.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
126
- zuspec_dataclasses-0.0.1.6449650798.dist-info/METADATA,sha256=aNnPTILn4j7ywVZFZyd8PImgeCVNqhOyh2jeWGTLYz8,499
127
- zuspec_dataclasses-0.0.1.6449650798.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
128
- zuspec_dataclasses-0.0.1.6449650798.dist-info/top_level.txt,sha256=BHigRYcGvNv_xCJUUv5OXgSPSoczsH3Tle0gABks4l0,16
129
- zuspec_dataclasses-0.0.1.6449650798.dist-info/RECORD,,
126
+ zuspec_dataclasses-0.0.1.6449654181.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
127
+ zuspec_dataclasses-0.0.1.6449654181.dist-info/METADATA,sha256=6hr6XDnK3DCYq8EFkSEjju691pWZFMp6Uuh6YDvy5JM,499
128
+ zuspec_dataclasses-0.0.1.6449654181.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
129
+ zuspec_dataclasses-0.0.1.6449654181.dist-info/top_level.txt,sha256=BHigRYcGvNv_xCJUUv5OXgSPSoczsH3Tle0gABks4l0,16
130
+ zuspec_dataclasses-0.0.1.6449654181.dist-info/RECORD,,