Class: DomainType
- Inherits:
-
Node
show all
- Includes:
- PluginModule
- Defined in:
- lib/tecsgen/core/componentobj.rb,
lib/tecsgen/core/generate.rb,
lib/tecsgen/core/unjoin_plugin.rb
Overview
DomainType
region の domain を記憶するクラス
Constant Summary
collapse
- @@domain_regions =
ドメインに属する region の Hash domain 指定が一度も行われない場合、このリストは空である ルートリージョンは option = “OutOfDomain” で登録される (domain 指定が無ければ登録されない)
{ }
Class Method Summary
collapse
Instance Method Summary
collapse
-
#add_through_plugin(join, from_region, to_region, through_type) ⇒ Object
-
#create_domain_plugin ⇒ Object
-
#gen_factory ⇒ Object
-
#get_kind ⇒ Object
DomainType#ドメイン種別を得る return::Symbol :kernel, :user, :OutOfDomain.
-
#get_name ⇒ Object
-
#get_option ⇒ Object
-
#get_regions ⇒ Object
-
#initialize(region, name, option) ⇒ DomainType
constructor
{ :domain_type => [ region, … ] }.
-
#joinable?(from_region, to_region, through_type) ⇒ Boolean
-
#show_tree(indent) ⇒ Object
-
#unjoin_plugin ⇒ Object
gen_plugin_post_code, #generate_and_parse, #load_plugin
Methods inherited from Node
#cdl_error, #cdl_error2, #cdl_error3, #cdl_info, #cdl_info2, #cdl_warning, #cdl_warning2, #get_locale, #locale_str, #set_locale
Constructor Details
#initialize(region, name, option) ⇒ DomainType
{ :domain_type => [ region, … ] }
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
|
# File 'lib/tecsgen/core/componentobj.rb', line 6705
def initialize(region, name, option)
super()
@name = name
@plugin_name = (name.to_s + "Plugin").to_sym
plClass = load_plugin(@plugin_name, DomainPlugin)
@region = region
@option = option
if @@domain_regions[name]
if !@@domain_regions[name].include?(region)
@@domain_regions[name] << region
end
else
@@domain_regions[name] = [region]
end
end
|
Class Method Details
.get_domain_regions ⇒ Object
DomainType リージョンの Hash を得る
@@domain_regions の説明参照
6747
6748
6749
|
# File 'lib/tecsgen/core/componentobj.rb', line 6747
def self.get_domain_regions
return @@domain_regions
end
|
Instance Method Details
#add_through_plugin(join, from_region, to_region, through_type) ⇒ Object
6731
6732
6733
6734
|
# File 'lib/tecsgen/core/componentobj.rb', line 6731
def add_through_plugin(join, from_region, to_region, through_type)
return @plugin.add_through_plugin(join, from_region, to_region, through_type)
end
|
#create_domain_plugin ⇒ Object
6722
6723
6724
6725
6726
6727
6728
6729
|
# File 'lib/tecsgen/core/componentobj.rb', line 6722
def create_domain_plugin
if !@plugin
pluginClass = Object.const_get @plugin_name
return if pluginClass.nil?
@plugin = pluginClass.new(@region, @name, @option)
@plugin.set_locale @locale
end
end
|
#gen_factory ⇒ Object
5202
5203
5204
5205
|
# File 'lib/tecsgen/core/generate.rb', line 5202
def gen_factory
@plugin.gen_factory
end
|
DomainType#ドメイン種別を得る
return::Symbol :kernel, :user, :OutOfDomain
6761
6762
6763
|
# File 'lib/tecsgen/core/componentobj.rb', line 6761
def get_kind
@plugin.get_kind
end
|
6741
6742
6743
|
# File 'lib/tecsgen/core/componentobj.rb', line 6741
def get_name
@name
end
|
#get_option ⇒ Object
6755
6756
6757
|
# File 'lib/tecsgen/core/componentobj.rb', line 6755
def get_option
@option
end
|
#get_regions ⇒ Object
6751
6752
6753
|
# File 'lib/tecsgen/core/componentobj.rb', line 6751
def get_regions
return @@domain_regions[@name]
end
|
#joinable?(from_region, to_region, through_type) ⇒ Boolean
6736
6737
6738
6739
|
# File 'lib/tecsgen/core/componentobj.rb', line 6736
def joinable?(from_region, to_region, through_type)
return @plugin.joinable?(from_region, to_region, through_type)
end
|
#show_tree(indent) ⇒ Object
6765
6766
6767
6768
|
# File 'lib/tecsgen/core/componentobj.rb', line 6765
def show_tree(indent)
(indent + 1).times { print(" ") }
puts "domain: name=#{@name} plugin=#{@plugin_name} option=#{@option}"
end
|
#unjoin_plugin ⇒ Object
149
150
151
|
# File 'lib/tecsgen/core/unjoin_plugin.rb', line 149
def unjoin_plugin
@plugin = nil
end
|