-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathinverseAttribute.h
More file actions
67 lines (53 loc) · 2.17 KB
/
inverseAttribute.h
File metadata and controls
67 lines (53 loc) · 2.17 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
#ifndef INVERSEATTRIBUTE_H
#define INVERSEATTRIBUTE_H
#include "attrDescriptor.h"
class SC_CORE_EXPORT Inverse_attribute : public AttrDescriptor {
public:
const char * _inverted_attr_id;
const char * _inverted_entity_id;
protected:
const AttrDescriptor * _inverted_attr; // not implemented (?!) (perhaps this means "not used"?)
public:
Inverse_attribute(
const char * name, // i.e. char *
TypeDescriptor * domainType,
Logical optional, // i.e. F U or T*/
Logical unique, // i.e. F U or T
const EntityDescriptor & owner,
const char * inverted_attr_id = 0
) : AttrDescriptor( name, domainType, optional, unique,
AttrType_Inverse, owner ),
_inverted_attr_id( inverted_attr_id ),
_inverted_entity_id( 0 ), _inverted_attr( 0 )
{ }
virtual ~Inverse_attribute() { }
const char * AttrExprDefStr( std::string & s ) const;
const char * inverted_attr_id_() const {
return _inverted_attr_id;
}
void inverted_attr_id_( const char * iai ) {
_inverted_attr_id = iai;
}
const char * inverted_entity_id_() const {
return _inverted_entity_id;
}
void inverted_entity_id_( const char * iei ) {
_inverted_entity_id = iei;
}
/// FIXME not implemented (?!) (perhaps this means "not set"?)
//set _inverted_attr in an extra init step in generated code? any other way to ensure pointers are valid?
const class AttrDescriptor * inverted_attr_() const {
return _inverted_attr;
}
void inverted_attr_( const AttrDescriptor * ia ) {
_inverted_attr = ia;
}
// below are obsolete (and not implemented anyway)
// class AttrDescriptor * InverseAttribute() {
// return _inverted_attr;
// }
// void InverseOf( AttrDescriptor * invAttr ) {
// _inverted_attr = invAttr;
// }
};
#endif //INVERSEATTRIBUTE_H