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.



170
171
172
173
174
175
# File 'lib/redshift/target/c/component-gen.rb', line 170

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.



169
170
171
# File 'lib/redshift/target/c/component-gen.rb', line 169

def kind
  @kind
end

#nameObject (readonly)

Returns the value of attribute name.



169
170
171
# File 'lib/redshift/target/c/component-gen.rb', line 169

def name
  @name
end

Instance Method Details

#indexObject



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

def index
  @cont_state.inherited_var_count + @index_delta
end

#strict?Boolean

Returns:

  • (Boolean)


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

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