Class/Module Index [+]

Quicksearch

RGen::ECore::ECoreBuilderMethods

Public Instance Methods

contains_1(name, type, argHash={}) click to toggle source

containment reference shortcuts

# File lib/rgen/ecore/ecore_builder_methods.rb, line 58
def contains_1(name, type, argHash={})
  references_1(name, type, {:containment => true}.merge(argHash))  
end
Also aliased as: contains_one
contains_1to1(name, type, oppositeName, argHash={}) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 68
def contains_1to1(name, type, oppositeName, argHash={})
  references_1to1(name, type, oppositeName, {:containment => true}.merge(argHash))  
end
Also aliased as: contains_one_to_one
contains_1toN(name, type, oppositeName, argHash={}) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 73
def contains_1toN(name, type, oppositeName, argHash={})
  references_1toN(name, type, oppositeName, {:containment => true}.merge(argHash))  
end
Also aliased as: contains_one_to_many
contains_N(name, type, argHash={}) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 63
def contains_N(name, type, argHash={})
  references_N(name, type, {:containment => true}.merge(argHash))  
end
Also aliased as: contains_many
contains_many(name, type, argHash={}) click to toggle source
Alias for: contains_N
contains_one(name, type, argHash={}) click to toggle source
Alias for: contains_1
contains_one_to_many(name, type, oppositeName, argHash={}) click to toggle source
Alias for: contains_1toN
contains_one_to_one(name, type, oppositeName, argHash={}) click to toggle source
Alias for: contains_1to1
eAttr(name, type, argHash={}, &block) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 6
def eAttr(name, type, argHash={}, &block)
  eAttribute(name, {:eType => type}.merge(argHash), &block)
end
eBiRef(name, type, oppositeName, argHash={}) click to toggle source

create bidirectional reference at once

# File lib/rgen/ecore/ecore_builder_methods.rb, line 15
def eBiRef(name, type, oppositeName, argHash={})
  raise BuilderError.new("eOpposite attribute not allowed for bidirectional references")        if argHash[:eOpposite] || argHash[:opposite_eOpposite]
  eReference(name, {:eType => type}.merge(argHash.reject{|k,v| k.to_s =~ /^opposite_/})) do 
    eReference oppositeName, {:eContainingClass => type, :eType => _context(2),
      :as => :eOpposite, :eOpposite => _context(1)}.
        merge(Hash[*(argHash.select{|k,v| k.to_s =~ /^opposite_/}.
          collect{|p| [p[0].to_s.sub(/^opposite_/,"").to_sym, p[1]]}.flatten)])
  end
end
eRef(name, type, argHash={}, &block) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 10
def eRef(name, type, argHash={}, &block)
  eReference(name, {:eType => type}.merge(argHash), &block)
end
Also aliased as: references_1, references_one
references_1(name, type, argHash={}, &block) click to toggle source

reference shortcuts

Alias for: eRef
references_1to1(name, type, oppositeName, argHash={}) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 36
def references_1to1(name, type, oppositeName, argHash={})
  eBiRef(name, type, oppositeName, {:upperBound => 1, :opposite_upperBound => 1}.merge(argHash))
end
Also aliased as: references_one_to_one
references_1toN(name, type, oppositeName, argHash={}) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 41
def references_1toN(name, type, oppositeName, argHash={})
  eBiRef(name, type, oppositeName, {:upperBound => -1, :opposite_upperBound => 1}.merge(argHash))
end
Also aliased as: references_one_to_many
references_MtoN(name, type, oppositeName, argHash={}) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 51
def references_MtoN(name, type, oppositeName, argHash={})
  eBiRef(name, type, oppositeName, {:upperBound => -1, :opposite_upperBound => -1}.merge(argHash))
end
Also aliased as: references_many_to_many
references_N(name, type, argHash={}) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 31
def references_N(name, type, argHash={})
  eRef(name, type, {:upperBound => -1}.merge(argHash))
end
Also aliased as: references_many
references_Nto1(name, type, oppositeName, argHash={}) click to toggle source
# File lib/rgen/ecore/ecore_builder_methods.rb, line 46
def references_Nto1(name, type, oppositeName, argHash={})
  eBiRef(name, type, oppositeName, {:upperBound => 1, :opposite_upperBound => -1}.merge(argHash))
end
Also aliased as: references_many_to_one
references_many(name, type, argHash={}) click to toggle source
Alias for: references_N
references_many_to_many(name, type, oppositeName, argHash={}) click to toggle source
Alias for: references_MtoN
references_many_to_one(name, type, oppositeName, argHash={}) click to toggle source
Alias for: references_Nto1
references_one(name, type, argHash={}, &block) click to toggle source
Alias for: eRef
references_one_to_many(name, type, oppositeName, argHash={}) click to toggle source
Alias for: references_1toN
references_one_to_one(name, type, oppositeName, argHash={}) click to toggle source
Alias for: references_1to1

[Validate]

Generated with the Darkfish Rdoc Generator 2.