Module: BOAST::PrivateStateAccessor

Included in:
CKernel, ConstArray, ControlStructure, DataType, Dimension, Expression, FuncCall, Operator, Pragma, Procedure, Ternary, Variable
Defined in:
lib/BOAST/State.rb,
lib/BOAST/CKernel.rb,
lib/BOAST/Algorithm.rb

Class Method Summary collapse

Class Method Details

.private_boolean_state_accessor(*args) ⇒ Object



63
64
65
66
67
68
69
70
71
72
73
74
# File 'lib/BOAST/State.rb', line 63

def self.private_boolean_state_accessor(*args)
  self.private_state_accessor(*args)
  args.each { |arg|
    s = <<EOF
private
def #{arg}?
  BOAST::#{arg}?
end
EOF
    eval s
  }
end

.private_state_accessor(*args) ⇒ Object



42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# File 'lib/BOAST/State.rb', line 42

def self.private_state_accessor(*args)
  args.each { |arg|
    s = <<EOF
private
def #{arg}=(val)
  BOAST::#{arg}= val
end
def #{arg}
  BOAST::#{arg}
end
def set_#{arg}(val)
  BOAST::set_#{arg}(val)
end
def get_#{arg}
  BOAST::get_#{arg}
end
EOF
    eval s
  }
end