1 #ifndef ENTITYEXTENT_H
2 #define ENTITYEXTENT_H 1
3 
4 #include <sc_export.h>
5 
6 /*
7 //#include <sdaiDefs.h>
8 //#include <ApplInstanceSet.h>
9 //#include <SessionInstance.h>
10 //#include <ModelContents.h>
11 */
12 
13 /*
14    7.3.3  Entity extent
15 */
16 
17 class SDAI_Entity_extent;
18 typedef SDAI_Entity_extent * SDAI_Entity_extent_ptr;
19 typedef SDAI_Entity_extent_ptr SDAI_Entity_extent_var;
20 
21 class SC_DAI_EXPORT SDAI_Entity_extent : public SDAI_Session_instance {
22 
23         friend class SDAI_Model_contents;
24         /*
25            NOTE - The ModelContent class is a friend so that ModelContent may add
26            instances to Entity_extent instances.
27          */
28 
29     public: //for now
30 //  protected:
31         Entity_ptr _definition ;
32         SDAI_Entity_name _definition_name ;
33         SDAI_DAObject__set _instances ;   //  of  Application_instance
34 //    Entity_instance__set _instances ;   //  of  entity_instance
35 //    EntityAggregate _instances ;    //  of  entity_instance
36 // Express in part 22 - INVERSE owned_by : sdai_model_contents FOR folders;
37         SDAI_Model_contents__list _owned_by ;  //  ADDED in Part 22
38 
39 //  private:
40         SDAI_Entity_extent();
41 //    SDAI_Entity_extent(const SDAI_Entity_extent& ee);
42         ~SDAI_Entity_extent(); // not in part 23
43 
44     public:
45 
definition_name_()46         SDAI_Entity_name definition_name_() const {
47             return _definition_name;
48         }
49 
50         Entity_ptr definition_() const;
51 #ifdef SDAI_CPP_LATE_BINDING
52 //    const Entity_ptr definition_() const;
53 #endif
54 
instances_()55         SDAI_DAObject__set_var instances_() {
56             return &_instances;
57         }
instances_()58         SDAI_DAObject__set_var instances_() const {
59             return ( const SDAI_DAObject__set_var )&_instances;
60         }
61 
62 // need to implement Model_contents__list
63         SDAI_Model_contents__list_var owned_by_() const;
64 
65 //    static SDAI_Entity_extent_ptr
66 //          _duplicate(SDAI_Entity_extent_ptr eep);
67 //    static SDAI_Entity_extent_ptr _narrow(Object_ptr op);
68 //    static SDAI_Entity_extent_ptr _nil();
69 
70 //  private:
71         void definition_( const Entity_ptr & ep );
72 #ifdef SDAI_CPP_LATE_BINDING
73 //    void definition_(const Entity_ptr& ep);
74 #endif
75         void definition_name_( const SDAI_Entity_name & ep );
76         void owned_by_( SDAI_Model_contents__list_var & mclv );
77 
78         /*
79            7.3.3.1  SDAI operation declarations
80 
81            7.3.3.1.1  AddInstance
82          */
83 
84         // this is no longer in Part 23
85         void AddInstance( const SDAI_DAObject_ptr & appInst );
86 
87         /*
88            Function:
89 
90            The AddInstance function shall add the entity instance entity
91            handle to the instances set of the receiver.
92 
93            Possible error indicators:
94            sdaiSS_NOPN         // Session not open
95            sdaiRP_NOPN         // Repository not open
96            sdaiMO_NEXS         // SDAI-model does not exist
97            sdaiMX_NRW          // SDAI-model access not read-write
98            sdaiSY_ERR          // Underlying system error
99 
100            Origin: Convenience function
101          */
102 
103         // this is no longer in Part 23
104         void RemoveInstance( const SDAI_DAObject_ptr & appInst );
105 
106         /*
107            7.3.3.1.2  RemoveInstance
108            Function:
109            The RemoveInstance function shall remove the entity instance entity
110            handle from the instances set of the receiver.
111 
112            Possible error indicators:
113            sdaiSS_NOPN         // Session not open
114            sdaiRP_NOPN         // Repository not open
115            sdaiMO_NEXS         // SDAI-model does not exist
116            sdaiMX_NRW          // SDAI-model access not read-write
117            sdaiSY_ERR          // Underlying system error
118 
119            Origin: Convenience function
120            */
121 
122 };
123 
124 #endif
125