Skip to content

Commit 5b68726

Browse files
committed
continue splitting ExpDict up
1 parent d7b3129 commit 5b68726

15 files changed

Lines changed: 641 additions & 656 deletions

src/clstepcore/CMakeLists.txt

Lines changed: 75 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,111 @@
11

22
set(LIBSTEPCORE_SRCS
3-
sdaiApplication_instance.cc
4-
STEPcomplex.cc
5-
STEPaggregate.cc
6-
STEPattribute.cc
7-
STEPattribute.inline.cc
8-
STEPattributeList.cc
9-
STEPinvAttrList.cc
10-
STEPundefined.cc
11-
sdai.cc
12-
sdaiSelect.cc
13-
SingleLinkList.cc
14-
Registry.cc
15-
ExpDict.cc
16-
ExpDict.inline.cc
17-
read_func.cc
3+
aggrTypeDescriptor.cc
4+
attrDescriptor.cc
5+
attrDescriptorList.cc
186
collect.cc
197
complexlist.cc
8+
create_Aggr.cc
9+
derivedAttribute.cc
10+
dictSchema.cc
11+
dispnode.cc
12+
dispnodelist.cc
13+
entityDescriptor.cc
14+
entityDescriptorList.cc
2015
entlist.cc
21-
multlist.cc
22-
orlist.cc
2316
entnode.cc
24-
non-ors.cc
25-
match-ors.cc
26-
trynext.cc
27-
print.cc
17+
enumTypeDescriptor.cc
18+
explicitItemId.cc
19+
globalRule.cc
20+
implicitItemId.cc
2821
instmgr.cc
22+
interfaceSpec.cc
23+
interfacedItem.cc
24+
inverseAttribute.cc
25+
inverseAttributeList.cc
26+
match-ors.cc
2927
mgrnode.cc
3028
mgrnodearray.cc
3129
mgrnodelist.cc
32-
dispnode.cc
33-
dispnodelist.cc
30+
multlist.cc
3431
needFunc.cc
35-
attrDescriptorList.cc
36-
entityDescriptorList.cc
37-
inverseAttributeList.cc
38-
typeDescriptorList.cc
39-
attrDescriptor.cc
40-
derivedAttribute.cc
41-
entityDescriptor.cc
42-
enumTypeDescriptor.cc
43-
inverseAttribute.cc
44-
typeDescriptor.cc
32+
non-ors.cc
33+
orlist.cc
34+
print.cc
35+
read_func.cc
36+
Registry.cc
4537
schRename.cc
46-
dictSchema.cc
47-
whereRule.cc
48-
uniquenessRule.cc
49-
interfacedItem.cc
50-
explicitItemId.cc
51-
implicitItemId.cc
52-
interfaceSpec.cc
38+
sdai.cc
39+
sdaiApplication_instance.cc
40+
sdaiSelect.cc
41+
selectTypeDescriptor.cc
42+
SingleLinkList.cc
43+
STEPaggregate.cc
44+
STEPattribute.cc
45+
STEPattribute.inline.cc
46+
STEPattributeList.cc
47+
STEPcomplex.cc
48+
STEPinvAttrList.cc
49+
STEPundefined.cc
50+
trynext.cc
51+
typeDescriptor.cc
52+
typeDescriptorList.cc
5353
typeOrRuleVar.cc
54-
globalRule.cc
54+
uniquenessRule.cc
55+
whereRule.cc
5556
)
5657

5758
set(SC_CLSTEPCORE_HDRS
59+
aggrTypeDescriptor.h
60+
attrDescriptor.h
61+
attrDescriptorList.h
5862
baseType.h
5963
complexSupport.h
64+
create_Aggr.h
65+
derivedAttribute.h
66+
dictSchema.h
6067
dictdefs.h
68+
dictionaryInstance.h
69+
dispnode.h
70+
dispnodelist.h
71+
entityDescriptor.h
72+
entityDescriptorList.h
73+
enumTypeDescriptor.h
6174
ExpDict.h
75+
explicitItemId.h
76+
globalRule.h
77+
implicitItemId.h
78+
instmgr.h
79+
interfaceSpec.h
80+
interfacedItem.h
81+
inverseAttribute.h
82+
inverseAttributeList.h
83+
mgrnode.h
84+
mgrnodearray.h
85+
mgrnodelist.h
86+
needFunc.h
6287
read_func.h
88+
realTypeDescriptor.h
6389
Registry.h
64-
sdaiApplication_instance.h
90+
schRename.h
6591
sdai.h
92+
sdaiApplication_instance.h
6693
sdaiSelect.h
94+
selectTypeDescriptor.h
6795
SingleLinkList.h
6896
STEPaggregate.h
6997
STEPattribute.h
7098
STEPattributeList.h
71-
STEPinvAttrList.h
7299
STEPcomplex.h
100+
STEPinvAttrList.h
73101
STEPundefined.h
74-
instmgr.h
75-
mgrnode.h
76-
mgrnodearray.h
77-
mgrnodelist.h
78-
dispnode.h
79-
dispnodelist.h
80-
needFunc.h
102+
stringTypeDescriptor.h
81103
SubSuperIterators.h
82-
attrDescriptorList.h
83-
entityDescriptorList.h
84-
inverseAttributeList.h
85-
typeDescriptorList.h
86-
attrDescriptor.h
87-
derivedAttribute.h
88-
entityDescriptor.h
89-
enumTypeDescriptor.h
90-
inverseAttribute.h
91104
typeDescriptor.h
92-
schRename.h
93-
dictSchema.h
94-
whereRule.h
95-
uniquenessRule.h
96-
dictionaryInstance.h
105+
typeDescriptorList.h
97106
typeOrRuleVar.h
98-
aggrCreatorTDs.h
99-
explicitItemId.h
100-
globalRule.h
101-
implicitItemId.h
102-
interfaceSpec.h
103-
interfacedItem.h
107+
uniquenessRule.h
108+
whereRule.h
104109
)
105110

106111
include_directories(

src/clstepcore/ExpDict.cc

Lines changed: 9 additions & 204 deletions
Original file line numberDiff line numberDiff line change
@@ -10,208 +10,13 @@
1010
* and is not subject to copyright.
1111
*/
1212

13-
#include <sc_cf.h>
14-
15-
#include <memory.h>
16-
#include <math.h>
17-
#include <stdio.h>
18-
19-
#include <ExpDict.h>
20-
#include <STEPaggregate.h>
21-
#include <Registry.h>
22-
#include "sc_memmgr.h"
23-
#include <SubSuperIterators.h>
24-
25-
26-
///////////////////////////////////////////////////////////////////////////////
27-
28-
///////////////////////////////////////////////////////////////////////////////
29-
30-
31-
//////////////////////////////////////////////////////////////////////////////
32-
33-
///////////////////////////////////////////////////////////////////////////////
34-
35-
EnumAggregate * create_EnumAggregate() {
36-
return new EnumAggregate;
37-
}
38-
39-
GenericAggregate * create_GenericAggregate() {
40-
return new GenericAggregate;
41-
}
42-
43-
EntityAggregate * create_EntityAggregate() {
44-
return new EntityAggregate;
45-
}
46-
47-
SelectAggregate * create_SelectAggregate() {
48-
return new SelectAggregate;
49-
}
50-
51-
StringAggregate * create_StringAggregate() {
52-
return new StringAggregate;
53-
}
54-
55-
BinaryAggregate * create_BinaryAggregate() {
56-
return new BinaryAggregate;
57-
}
58-
59-
RealAggregate * create_RealAggregate() {
60-
return new RealAggregate;
61-
}
62-
63-
IntAggregate * create_IntAggregate() {
64-
return new IntAggregate;
65-
}
66-
67-
68-
69-
///////////////////////////////////////////////////////////////////////////////
70-
71-
72-
///////////////////////////////////////////////////////////////////////////////
73-
74-
75-
76-
77-
/** FIXME
78-
* #ifdef NOT_YET
79-
///////////////////////////////////////////////////////////////////////////////
80-
// EnumerationTypeDescriptor functions
81-
///////////////////////////////////////////////////////////////////////////////
82-
EnumerationTypeDescriptor::EnumerationTypeDescriptor( ) {
83-
_elements = new StringAggregate;
84-
}
85-
* #endif
86-
*/
87-
88-
///////////////////////////////////////////////////////////////////////////////
89-
// SelectTypeDescriptor functions
90-
///////////////////////////////////////////////////////////////////////////////
91-
92-
SDAI_Select * SelectTypeDescriptor::CreateSelect() {
93-
if( CreateNewSelect ) {
94-
return CreateNewSelect();
95-
} else {
96-
return 0;
97-
}
98-
}
99-
100-
const TypeDescriptor * SelectTypeDescriptor::IsA( const TypeDescriptor * other ) const {
101-
return TypeDescriptor::IsA( other );
102-
}
103-
104-
/**
105-
* returns the td among the choices of tds describing elements of this select
106-
* type but only at this unexpanded level. The td ultimately describing the
107-
* type may be an element of a td for a select that is returned.
108-
*/
109-
const TypeDescriptor * SelectTypeDescriptor::CanBe( const TypeDescriptor * other ) const {
110-
if( this == other ) {
111-
return other;
112-
}
113-
114-
TypeDescItr elements( GetElements() ) ;
115-
const TypeDescriptor * td = elements.NextTypeDesc();
116-
while( td ) {
117-
if( td -> CanBe( other ) ) {
118-
return td;
119-
}
120-
td = elements.NextTypeDesc();
121-
}
122-
return 0;
123-
}
124-
125-
/**
126-
* returns the td among the choices of tds describing elements of this select
127-
* type but only at this unexpanded level. The td ultimately describing the
128-
* type may be an element of a td for a select that is returned.
129-
*/
130-
const TypeDescriptor * SelectTypeDescriptor::CanBe( const char * other ) const {
131-
TypeDescItr elements( GetElements() ) ;
132-
const TypeDescriptor * td = 0;
133-
134-
// see if other is the select
135-
if( !StrCmpIns( _name, other ) ) {
136-
return this;
137-
}
138-
139-
// see if other is one of the elements
140-
while( ( td = elements.NextTypeDesc() ) ) {
141-
if( td -> CanBe( other ) ) {
142-
return td;
143-
}
144-
}
145-
return 0;
146-
}
147-
148-
/**
149-
* A modified CanBe, used to determine if "other", a string we have just read,
150-
* is a possible type-choice of this. (I.e., our select "CanBeSet" to this
151-
* choice.) This deals with the following issue, based on the Tech Corrigendum
152-
* to Part 21: Say our select ("selP") has an item which is itself a select
153-
* ("selQ"). Say it has another select item which is a redefinition of another
154-
* select ("TYPE selR = selS;"). According to the T.C., if selP is set to one
155-
* of the members of selQ, "selQ(...)" may not appear in the instantiation.
156-
* If, however, selP is set to a member of selR, "selR(...)" must appear first.
157-
* The code below checks if "other" = one of our possible choices. If one of
158-
* our choices is a select like selQ, we recurse to see if other matches a
159-
* member of selQ (and don't look for "selQ"). If we have a choice like selR,
160-
* we check if other = "selR", but do not look at selR's members. This func-
161-
* tion also takes into account schNm, the name of the current schema. If
162-
* schNm does not = the schema in which this type was declared, it's possible
163-
* that it should be referred to with a different name. This would be the case
164-
* if schNm = a schema which USEs or REFERENCEs this and renames it (e.g., "USE
165-
* from XX (A as B)").
13+
/*
14+
* \file ExpDict.cc
15+
* this file has been split into many smaller files, organized by class rather than by member:
16+
*
17+
* aggrTypeDescriptor.cc dictSchema.cc globalRule.cc inverseAttributeList.cc typeOrRuleVar.cc
18+
* attrDescriptor.cc entityDescriptor.cc implicitItemId.cc schRename.cc uniquenessRule.cc
19+
* attrDescriptorList.cc entityDescriptorList.cc interfaceSpec.cc selectTypeDescriptor.cc whereRule.cc
20+
* create_Aggr.cc enumTypeDescriptor.cc interfacedItem.cc typeDescriptor.cc
21+
* derivedAttribute.cc explicitItemId.cc inverseAttribute.cc typeDescriptorList.cc
16622
*/
167-
const TypeDescriptor * SelectTypeDescriptor::CanBeSet( const char * other, const char * schNm ) const {
168-
TypeDescItr elements( GetElements() ) ;
169-
const TypeDescriptor * td = elements.NextTypeDesc();
170-
171-
while( td ) {
172-
if( td->Type() == REFERENCE_TYPE && td->NonRefType() == sdaiSELECT ) {
173-
// Just look at this level, don't look at my items (see intro).
174-
if( td->CurrName( other, schNm ) ) {
175-
return td;
176-
}
177-
} else if( td->CanBeSet( other, schNm ) ) {
178-
return td;
179-
}
180-
td = elements.NextTypeDesc();
181-
}
182-
return 0;
183-
}
184-
185-
///////////////////////////////////////////////////////////////////////////////
186-
// AggrTypeDescriptor functions
187-
///////////////////////////////////////////////////////////////////////////////
188-
189-
STEPaggregate * AggrTypeDescriptor::CreateAggregate() {
190-
if( CreateNewAggr ) {
191-
return CreateNewAggr();
192-
} else {
193-
return 0;
194-
}
195-
}
196-
197-
void AggrTypeDescriptor::AssignAggrCreator( AggregateCreator f ) {
198-
CreateNewAggr = f;
199-
}
200-
201-
AggrTypeDescriptor::AggrTypeDescriptor( ) :
202-
_uniqueElements( "UNKNOWN_TYPE" ) {
203-
_bound1 = -1;
204-
_bound2 = -1;
205-
_aggrDomainType = 0;
206-
}
207-
208-
AggrTypeDescriptor::AggrTypeDescriptor( SDAI_Integer b1,
209-
SDAI_Integer b2,
210-
Logical uniqElem,
211-
TypeDescriptor * aggrDomType )
212-
: _bound1( b1 ), _bound2( b2 ), _uniqueElements( uniqElem ) {
213-
_aggrDomainType = aggrDomType;
214-
}
215-
216-
AggrTypeDescriptor::~AggrTypeDescriptor() {
217-
}

0 commit comments

Comments
 (0)