class RbGCCXML::ArrayType

Node that represents <ArrayType>, which is any static array declaration. One oddity on how GCC-XML parses certain array designations:

void func(int in[4][3]);

will be parsed out as

void func(int* in[3]);

aka, a pointer to a 3-element array, so keep this in mind when doing comparisons or wondering why the #to_cpp output is so odd

Public Instance Methods

==(val) click to toggle source
# File lib/rbgccxml/nodes/types/array_type.rb, line 17
def ==(val)
  check_sub_type_without(val, %r\[\d\]/)
to_cpp(qualified = true) click to toggle source

See RbGCCXML::Node#to_cpp

# File lib/rbgccxml/nodes/types/array_type.rb, line 22
def to_cpp(qualified = true)
  type = NodeCache.find(attributes["type"])
  "#{type.to_cpp(qualified)}[#{attributes["max"].gsub(/[^\d]/, '').to_i + 1}]"