Class: RedShift::Component::ContVarDescriptor

Inherits:
Object
  • Object
show all
Defined in:
lib/redshift/target/c/component-gen.rb

Overview

one per variable, shared by subclasses which inherit it not a run-time object, except for introspection

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, index_delta, cont_state, kind) ⇒ ContVarDescriptor

Returns a new instance of ContVarDescriptor.



177
178
179
180
181
182
# File 'lib/redshift/target/c/component-gen.rb', line 177

def initialize name, index_delta, cont_state, kind
  @name = name
  @index_delta = index_delta
  @cont_state = cont_state
  @kind = kind
end

Instance Attribute Details

#kindObject (readonly)

Returns the value of attribute kind.



176
177
178
# File 'lib/redshift/target/c/component-gen.rb', line 176

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



176
177
178
# File 'lib/redshift/target/c/component-gen.rb', line 176

def name
  @name
end

Instance Method Details

#indexObject



184
185
186
# File 'lib/redshift/target/c/component-gen.rb', line 184

def index
  @cont_state.inherited_var_count + @index_delta
end

#strict?Boolean

Returns:

  • (Boolean)


183
# File 'lib/redshift/target/c/component-gen.rb', line 183

def strict?; @kind == :strict; end