Skip to content

Commit 9efd75e

Browse files
committed
add some small schemas and a .p21; should be examined, maybe moved/simplified
1 parent 98283dc commit 9efd75e

File tree

4 files changed

+84
-0
lines changed

4 files changed

+84
-0
lines changed

test/p21/test_inherit_inverse.p21

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
ISO-10303-21;
2+
HEADER;
3+
FILE_DESCRIPTION(('SCL test file'),'2;1');
4+
FILE_NAME('test_inherit_inverse.p21','2014-03-17T',('mp'),(''),'0','1','2');
5+
FILE_SCHEMA(('test_inherit_inverse'));
6+
ENDSEC;
7+
DATA;
8+
9+
#1=GEOMETRIC_REPRESENTATION_CONTEXT(2,'ctx type',9);
10+
11+
#2=REPRESENTATION('rep',#1);
12+
13+
ENDSEC;
14+
END-ISO-10303-21;
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
--derived from AP214E3
3+
--schema to test inverse attributes when inherited
4+
-- TODO what about ia's from 2nd or 3rd parent? must be handled differently...
5+
6+
SCHEMA test_inherit_inverse;
7+
8+
ENTITY representation;
9+
name : STRING;
10+
context_of_items : representation_context;
11+
END_ENTITY;
12+
13+
ENTITY representation_context;
14+
context_identifier : INTEGER;
15+
context_type : STRING;
16+
INVERSE
17+
representations_in_context : SET [1:?] OF representation FOR context_of_items;
18+
END_ENTITY;
19+
20+
ENTITY geometric_representation_context
21+
SUBTYPE OF (representation_context);
22+
coordinate_space_dimension : INTEGER;
23+
END_ENTITY;
24+
25+
END_SCHEMA;
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
-- portion of IFC2X3_TC1.exp
2+
SCHEMA inverse_bug;
3+
4+
ENTITY IfcFeatureElementAddition
5+
SUBTYPE OF (IfcFeatureElement);
6+
INVERSE
7+
ProjectsElements : IfcRelProjectsElement FOR RelatedFeatureElement; --error about this
8+
END_ENTITY;
9+
10+
ENTITY IfcFeatureElement
11+
SUBTYPE OF (IfcElement);
12+
END_ENTITY;
13+
14+
ENTITY IfcRelProjectsElement
15+
RelatingElement : IfcElement;
16+
RelatedFeatureElement : IfcFeatureElementAddition;
17+
END_ENTITY;
18+
19+
ENTITY IfcElement;
20+
Tag : OPTIONAL INTEGER;
21+
END_ENTITY;
22+
END_SCHEMA;
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
-- derived from pdm schema 12
2+
-- for debugging exp2cxx inverse attr numbering
3+
SCHEMA numbered_inverse_attr;
4+
ENTITY application_context;
5+
application : STRING;
6+
DERIVE
7+
description : STRING := 'teststring';
8+
id : INTEGER := 1234;
9+
INVERSE
10+
context_elements : SET[1:?] OF application_context_element FOR
11+
frame_of_reference;
12+
-- WHERE
13+
-- wr1 : SIZEOF(USEDIN(SELF,'PDM_SCHEMA.' + 'DESCRIPTION_ATTRIBUTE.DESCRIBED_ITEM')) <= 1;
14+
-- wr2 : SIZEOF(USEDIN(SELF,'PDM_SCHEMA.' + 'ID_ATTRIBUTE.IDENTIFIED_ITEM')) <= 1;
15+
END_ENTITY;
16+
17+
ENTITY application_context_element
18+
(* SUPERTYPE OF (ONEOF(product_concept_context,product_context,
19+
product_definition_context))*);
20+
name : STRING;
21+
frame_of_reference : application_context;
22+
END_ENTITY;
23+
END_SCHEMA;

0 commit comments

Comments
 (0)