Class: SFRP::Raw::VConst

Inherits:
Struct
  • Object
show all
Defined in:
lib/sfrp/raw/elements.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#native_strObject

Returns the value of attribute native_str

Returns:

  • (Object)

    the current value of native_str



34
35
36
# File 'lib/sfrp/raw/elements.rb', line 34

def native_str
  @native_str
end

#nsObject

Returns the value of attribute ns

Returns:

  • (Object)

    the current value of ns



34
35
36
# File 'lib/sfrp/raw/elements.rb', line 34

def ns
  @ns
end

#param_tasObject

Returns the value of attribute param_tas

Returns:

  • (Object)

    the current value of param_tas



34
35
36
# File 'lib/sfrp/raw/elements.rb', line 34

def param_tas
  @param_tas
end

#rnameObject

Returns the value of attribute rname

Returns:

  • (Object)

    the current value of rname



34
35
36
# File 'lib/sfrp/raw/elements.rb', line 34

def rname
  @rname
end

#spObject

Returns the value of attribute sp

Returns:

  • (Object)

    the current value of sp



34
35
36
# File 'lib/sfrp/raw/elements.rb', line 34

def sp
  @sp
end

#tconst_rnameObject

Returns the value of attribute tconst_rname

Returns:

  • (Object)

    the current value of tconst_rname



34
35
36
# File 'lib/sfrp/raw/elements.rb', line 34

def tconst_rname
  @tconst_rname
end

Instance Method Details

#absolute_nameObject



35
36
37
# File 'lib/sfrp/raw/elements.rb', line 35

def absolute_name
  ns.absolute_name(rname)
end

#gen_flat(src_set, dest_set) ⇒ Object



39
40
41
42
43
# File 'lib/sfrp/raw/elements.rb', line 39

def gen_flat(src_set, dest_set)
  tconst_str = src_set.tconst(ns, Ref.new(tconst_rname), sp).absolute_name
  flat_param_tas = param_tas.map { |ta| ta.to_flat(src_set, ns) }
  dest_set << Flat::VConst.new(absolute_name, tconst_str, native_str, flat_param_tas, sp)
end