Class: When::TM::TopologicalPrimitive

Inherits:
Primitive show all
Defined in:
lib/when_exe/tmobjects.rb

Overview

時間位相プリミティブ - 単独で不可分な位相要素

see gml schema

Direct Known Subclasses

Edge, Node

Constant Summary

Constants included from Parts::Resource

Parts::Resource::LabelProperty

Instance Attribute Summary collapse

Attributes inherited from BasicTypes::Object

#label

Attributes included from Parts::Resource

#_pool, #child, #keys, #locale, #namespace

Instance Method Summary collapse

Methods included from Order

#relative_position

Methods included from Parts::Resource

#[], #^, _decode, _encode, _extract_prefix, _instance, _parse, _path_with_prefix, _replace_tags, _setup_, #each, #enum_for, #hierarchy, #include?, #included?, #iri, #leaf?, #m17n, #map, #next, #parent, #prev, #registered?

Methods included from Parts::Resource::Pool

#[], #[]=, #_pool, #_setup_, #pool_keys

Methods included from Parts::Resource::Synchronize

#synchronize

Constructor Details

#initializeTopologicalPrimitive

オブジェクトの生成


419
420
421
# File 'lib/when_exe/tmobjects.rb', line 419

def initialize
  @complex = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object (private)

Note:

When::TM::TopologicalPrimitive で定義されていないメソッドは 処理を @geometry (type: When::TM::Instant) に委譲する

その他のメソッド


433
434
435
436
437
438
439
440
441
442
443
444
# File 'lib/when_exe/tmobjects.rb', line 433

def method_missing(name, *args, &block)
  return _method_missing(name, *args, &block) if When::Parts::MethodCash::Escape.key?(name) ||
                                                 !respond_to?(:geometry)
  self.class.module_eval %Q{
    def #{name}(*args, &block)
      list = args.map {|arg| arg.respond_to?(:geometry) ? arg.geometry : arg}
      geometry.send("#{name}", *list, &block)
    end
  } unless When::Parts::MethodCash.escape(name)
  list = args.map {|arg| arg.respond_to?(:geometry) ? arg.geometry : arg}
  geometry.send(name, *list, &block)
end

Instance Attribute Details

#complexArray<When::TM::TopologicalComplex>

対応するコンプレックス (relation - Complex)


414
415
416
# File 'lib/when_exe/tmobjects.rb', line 414

def complex
  @complex
end