-
Notifications
You must be signed in to change notification settings - Fork 0
/
class_file.py
81 lines (66 loc) · 2.29 KB
/
class_file.py
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
#coding=utf-8
class BaseClass(object):
def __init__(self, t_name, c_name, c_type):
self.t_name = t_name
self.c_name = c_name
self.c_type = c_type
class cClass(BaseClass):
def __init__(self,t_name, c_name, c_type, value):
super(cClass,self).__init__(t_name, c_name, c_type)
self.value = 'c'
self.description = value
def __str__(self):
return 'c'
class TClass(BaseClass):
def __init__(self, t_name, c_name, c_type):
super(TClass,self).__init__(t_name,c_name,c_type)
self.description = t_name
self.value = 'T'
def __str__(self):
return 'T'
class VClass(BaseClass):
def __init__(self,t_name, c_name, c_type, value):
super(VClass,self).__init__(t_name,c_name,c_type)
self.value = 'V'
self.description = value
def __str__(self):
return 'V'
class NClass(BaseClass):
def __init__(self,t_name,c_name,c_type,value):
super(NClass,self).__init__(t_name,c_name,c_type)
self.c_type = 'number' #N 的 type一定是number
self.value = 'N'
self.description = value
def __str__(self):
return 'N'
class DClass(BaseClass):
def __init__(self,t_name,c_name,c_type, value):
super(DClass,self).__init__(t_name,c_name,c_type)
self.c_type = 'date' #D 的 type一定是number
self.value = 'D'
self.description = value
def __str__(self):
return 'D'
class Dir(BaseClass):
def __init__(self,t_name,c_name,c_type, dir='asc'):
super(Dir, self).__init__(t_name, c_name, c_type)
self.value = 'dir'
self.description = dir
def __str__(self):
return 'dir'
class BlankClass(BaseClass):
def __init__(self,t_name,c_name,c_type,value):
super(BlankClass,self).__init__(t_name,c_name,c_type)
self.c_type = 'blank' #N 的 type一定是number
self.value = 'blank'
self.description = value
def __str__(self):
return 'blank'
class ExcludeClass(BaseClass):
def __init__(self,t_name,c_name,c_type,value):
super(ExcludeClass,self).__init__(t_name,c_name,c_type)
self.c_type = "Excluding" #N 的 type一定是number
self.value = 'Excluding'
self.description = value
def __str__(self):
return 'Excluding'