-
Notifications
You must be signed in to change notification settings - Fork 133
Expand file tree
/
Copy pathuniquenessRule.h
More file actions
85 lines (67 loc) · 1.97 KB
/
Copy pathuniquenessRule.h
File metadata and controls
85 lines (67 loc) · 1.97 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
#ifndef UNIQUENESSRULE_H
#define UNIQUENESSRULE_H
#include "clstepcore/dictionaryInstance.h"
#include "clstepcore/sdai.h"
#include "sc_export.h"
class EntityDescriptor;
class SC_CORE_EXPORT Uniqueness_rule : public Dictionary_instance {
public:
#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable: 4251 )
#endif
Express_id _label;
// non-SDAI
std::string _comment; /** Comment contained in the EXPRESS.
* Should be properly formatted to include (* *)
* Will be written to EXPRESS as-is (w/out formatting) */
#ifdef _MSC_VER
#pragma warning( pop )
#endif
const EntityDescriptor * _parent_entity;
Uniqueness_rule();
Uniqueness_rule( const Uniqueness_rule & );
Uniqueness_rule( const char * label, EntityDescriptor * pe = 0 )
: _label( label ), _parent_entity( pe ) { }
virtual ~Uniqueness_rule();
Express_id label_() const {
return _label;
}
const EntityDescriptor * parent_() const {
return _parent_entity;
}
std::string & comment_() {
return _comment;
}
void label_( const Express_id & ei ) {
_label = ei;
}
void parent_( const EntityDescriptor * pe ) {
_parent_entity = pe;
}
void comment_( const char * c ) {
_comment = c;
}
};
typedef Uniqueness_rule * Uniqueness_rule_ptr;
class SC_CORE_EXPORT Uniqueness_rule__set {
public:
Uniqueness_rule__set( int = 16 );
~Uniqueness_rule__set();
Uniqueness_rule_ptr & operator[]( int index );
void Insert( Uniqueness_rule_ptr, int index );
void Append( Uniqueness_rule_ptr );
void Remove( int index );
int Index( Uniqueness_rule_ptr );
int Count();
void Clear();
private:
void Check( int index );
private:
Uniqueness_rule_ptr * _buf;
int _bufsize;
int _count;
};
typedef Uniqueness_rule__set * Uniqueness_rule__set_ptr;
typedef Uniqueness_rule__set_ptr Uniqueness_rule__set_var;
#endif //UNIQUENESSRULE_H