Class: CommonParam

Inherits:
Object
  • Object
show all
Defined in:
lib/ModelGenerator/CommonParam.rb

Class Method Summary collapse

Class Method Details

.entity_nameObject



2
3
4
# File 'lib/ModelGenerator/CommonParam.rb', line 2

def CommonParam.entity_name
  return /\[NAME\]/
end

.enum_declareObject



42
43
44
# File 'lib/ModelGenerator/CommonParam.rb', line 42

def CommonParam.enum_declare
    return /\[ENUM_DECLARE\]/
end

.file_declareObject



6
7
8
# File 'lib/ModelGenerator/CommonParam.rb', line 6

def CommonParam.file_declare
  return /\[DECLARE\]/
end

.header_importObject



46
47
48
# File 'lib/ModelGenerator/CommonParam.rb', line 46

def CommonParam.header_import
   return /\[HEADER_IMPORT\]/
end

.json_column_mappingObject



14
15
16
# File 'lib/ModelGenerator/CommonParam.rb', line 14

def CommonParam.json_column_mapping
    return /\[JSON_COLUMN_MAPPING\]/
end

.nimbus_methodObject



50
51
52
# File 'lib/ModelGenerator/CommonParam.rb', line 50

def CommonParam.nimbus_method
    return /\[NIMBUS_METHOD\]/
end

.property_declareObject



10
11
12
# File 'lib/ModelGenerator/CommonParam.rb', line 10

def CommonParam.property_declare
  return /\[PROPERTY_DECLARE\]/
end

.property_mappingObject



18
19
20
# File 'lib/ModelGenerator/CommonParam.rb', line 18

def CommonParam.property_mapping
    return /\[PROPERTY_MAPPING\]/
end

.reference_type_mappingObject



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/ModelGenerator/CommonParam.rb', line 79

def CommonParam.reference_type_mapping
  return  {"string" => "strong",
            "int" => "assign",
            "float" => "assign",
            "double" => "assign",
            "number" => "strong",
            "uint" => "assign",
            "date" => "strong",
            "data" => "strong",
            "time" => "assign",
            "url" => "strong",
            "array" => "strong",
            "marray" => "strong",
            "dic" => "strong",
            "mdic" => "strong",
            "indexset" => "strong",
            "mindexset" => "strong",
            "indexpath" => "strong",
            "mindexpath" => "strong",
            "bool" => "assign",
            "enum" => "assign",
            "mapping" => "strong",
            "custom" => "<#refrence_type#>"}
end

.table_column_declareObject



26
27
28
# File 'lib/ModelGenerator/CommonParam.rb', line 26

def CommonParam.table_column_declare
    return /\[TABLE_COLUMN_DECLARE\]/
end

.table_mappingObject



38
39
40
# File 'lib/ModelGenerator/CommonParam.rb', line 38

def CommonParam.table_mapping
    return /\[TABLE_MAPPING\]/
end

.table_nameObject



30
31
32
# File 'lib/ModelGenerator/CommonParam.rb', line 30

def CommonParam.table_name
    return /\[TABLE_NAME\]/
end

.table_primary_keyObject



34
35
36
# File 'lib/ModelGenerator/CommonParam.rb', line 34

def CommonParam.table_primary_key
    return /\[TABLE_PRIMARY_KEY\]/
end

.type_mappingObject



54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# File 'lib/ModelGenerator/CommonParam.rb', line 54

def CommonParam.type_mapping
  return {"string" => "NSString *",
          "int" => "NSInteger",
          "uint" => "NSUInteger",
          "float" => "CGFloat",
          "double" => "CGFloat",
          "number" => "NSNumber *",
          "date" => "NSDate *",
          "data" => "NSData *",
          "time" => "NSTimeInterval",
          "url" => "NSURL *",
          "array" => "NSArray *",
          "marray" => "NSMutableArray *",
          "dic" => "NSDictionary *",
          "mdic" => "NSMutableDictionary *",
          "indexset" => "NSIndexSet *",
          "mindexset" => "NSIndexPath *",
          "indexpath" => "NSIndexPath *",
          "mindexpath" => "NSMutableIndexSet *",
          "bool" => "BOOL",
          "enum" => "enum",
          "mapping" => "<#mapping#>",
          "custom" => "<#custom#>"}
end

.type_transformerObject



22
23
24
# File 'lib/ModelGenerator/CommonParam.rb', line 22

def CommonParam.type_transformer
    return /\[TYPE_TRANSFORMER\]/
end