forked from stepcode/stepcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselectTypeDescriptor.h
More file actions
51 lines (40 loc) · 1.44 KB
/
Copy pathselectTypeDescriptor.h
File metadata and controls
51 lines (40 loc) · 1.44 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
#ifndef SELECTTYPEDESCRIPTOR_H
#define SELECTTYPEDESCRIPTOR_H
#include "typeDescriptor.h"
typedef SDAI_Select * ( * SelectCreator )();
class SC_CORE_EXPORT SelectTypeDescriptor : public TypeDescriptor {
protected:
TypeDescriptorList _elements; // of TYPE_DESCRIPTOR
int _unique_elements;
public:
SelectCreator CreateNewSelect;
void AssignSelectCreator( SelectCreator f = 0 ) {
CreateNewSelect = f;
}
SDAI_Select * CreateSelect();
SelectTypeDescriptor( int b, const char * nm, PrimitiveType ft,
Schema * origSchema,
const char * d, SelectCreator f = 0 )
: TypeDescriptor( nm, ft, origSchema, d ),
_unique_elements( b ), CreateNewSelect( f )
{ }
virtual ~SelectTypeDescriptor() { }
TypeDescriptorList & Elements() {
return _elements;
}
const TypeDescriptorList & GetElements() const {
return _elements;
}
int UniqueElements() const {
return _unique_elements;
}
virtual const TypeDescriptor * IsA( const TypeDescriptor * ) const;
virtual const TypeDescriptor * IsA( const char * n ) const {
return TypeDescriptor::IsA( n );
}
virtual const TypeDescriptor * CanBe( const TypeDescriptor * ) const;
virtual const TypeDescriptor * CanBe( const char * n ) const;
virtual const TypeDescriptor * CanBeSet( const char *, const char * )
const;
};
#endif //SELECTTYPEDESCRIPTOR_H