Class: TECSCDE::TECSModel::TmRegion
Instance Attribute Summary
#owner
Instance Method Summary
collapse
#copy_from, #model, #modified
Constructor Details
#initialize(namespace_path, owner) ⇒ TmRegion
TmRegion#initialize
namespace_path::NamespacePath owner::TmRegion (parent) or TECSModel (root region)
60
61
62
63
64
65
66
67
68
|
# File 'lib/tecscde/tecs_model/tm_region.rb', line 60
def initialize(namespace_path, owner)
@namespace_path = namespace_path
@owner = owner
@sub_region = {}
@cell_list = {}
modified {}
end
|
Instance Method Details
#clone_for_undo ⇒ Object
96
97
98
99
100
|
# File 'lib/tecscde/tecs_model/tm_region.rb', line 96
def clone_for_undo
bu = clone
bu.copy_from(self)
bu
end
|
#delete_cell(cell) ⇒ Object
77
78
79
|
# File 'lib/tecscde/tecs_model/tm_region.rb', line 77
def delete_cell(cell)
@owner.delete_cell(cell)
end
|
#get_color ⇒ Object
74
75
|
# File 'lib/tecscde/tecs_model/tm_region.rb', line 74
def get_color
end
|
#get_namespace_path ⇒ Object
70
71
72
|
# File 'lib/tecscde/tecs_model/tm_region.rb', line 70
def get_namespace_path
@namespace_path
end
|
#get_region(name) ⇒ Object
85
86
87
88
89
90
91
92
93
|
# File 'lib/tecscde/tecs_model/tm_region.rb', line 85
def get_region(name)
if @sub_region[name].nil?
modified do
parent = self
@sub_region[name] = TmRegion.new(@namespace_path.append(name), parent)
end
end
@sub_region[name]
end
|
#rename_cell(cell, name) ⇒ Object
81
82
83
|
# File 'lib/tecscde/tecs_model/tm_region.rb', line 81
def rename_cell(cell, name)
@owner.rename_cell(cell, name)
end
|
#setup_clone(sub_region) ⇒ Object
102
103
104
|
# File 'lib/tecscde/tecs_model/tm_region.rb', line 102
def setup_clone(sub_region)
@sub_region = sub_region.dup
end
|