-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathsdaiEntity_extent.cc
More file actions
120 lines (96 loc) · 2.65 KB
/
sdaiEntity_extent.cc
File metadata and controls
120 lines (96 loc) · 2.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
///////// ENTITY entity_extent
//#include <EntityExtent.h>
#include <sdai.h>
#include "sc_memmgr.h"
SDAI_Entity_extent::SDAI_Entity_extent( )
: _definition( 0 ), _definition_name( 0 ), _owned_by( 0 ) {
/*
_definition = 0;
_definition_name = 0;
_owned_by = 0;
*/
}
/*
SDAI_Entity_extent::SDAI_Entity_extent(const SDAI_Entity_extent& ee)
{
// { CopyAs((STEPentityH) &e); }
_definition = 0;
_owned_by = 0;
}
*/
SDAI_Entity_extent::~SDAI_Entity_extent() {
delete _definition_name;
}
Entity_ptr
SDAI_Entity_extent ::definition_() const {
return _definition;
}
/*
const SDAI_Entity_name
SDAI_Entity_extent::definition_name_() const
{
return _definition_name;
}
*/
void
SDAI_Entity_extent::definition_( const Entity_ptr & ep ) {
_definition = ep;
}
void
SDAI_Entity_extent::definition_name_( const SDAI_Entity_name & en ) {
_definition_name = new char[strlen( en ) + 1];
strncpy( _definition_name, en, strlen( en ) + 1 );
}
void SDAI_Entity_extent::owned_by_( SDAI_Model_contents__list_var& mclv ) {
_owned_by = *mclv;
}
SDAI_Model_contents__list_var SDAI_Entity_extent ::owned_by_() const {
return ( const SDAI_Model_contents__list_var ) &_owned_by;
}
/*
SDAI_DAObject__set_var instances_()
{
return &_instances;
}
const
SDAI_DAObject__set_var instances_() const
{
return (const SDAI_DAObject__set_var)&_instances;
}
*/
/*
7.3.3.1 SDAI operation declarations
7.3.3.1.1 AddInstance
Function:
The AddInstance function shall add the entity instance entity
handle to the instances set of the receiver.
Possible error indicators:
sdaiSS_NOPN // Session not open
sdaiRP_NOPN // Repository not open
sdaiMO_NEXS // SDAI-model does not exist
sdaiMX_NRW // SDAI-model access not read-write
sdaiSY_ERR // Underlying system error
Origin: Convenience function
*/
void
SDAI_Entity_extent::AddInstance( const SDAI_DAObject_ptr & appInst ) {
_instances.Append( appInst );
}
/*
7.3.3.1.2 RemoveInstance
Function:
The RemoveInstance function shall remove the entity instance entity
handle from the instances set of the receiver.
Possible error indicators:
sdaiSS_NOPN // Session not open
sdaiRP_NOPN // Repository not open
sdaiMO_NEXS // SDAI-model does not exist
sdaiMX_NRW // SDAI-model access not read-write
sdaiSY_ERR // Underlying system error
Origin: Convenience function
*/
void
SDAI_Entity_extent::RemoveInstance( const SDAI_DAObject_ptr & appInst ) {
_instances.Remove( _instances.Index( appInst ) );
}
///////// END_ENTITY SDAI_Entity_extent