Method: AutoC::Type#initialize
- Defined in:
- lib/autoc/type.rb
#initialize(type, visibility = :public) ⇒ Type
Returns a new instance of Type.
170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/autoc/type.rb', line 170 def initialize(type, visibility = :public) @type = type.to_s @type_ref = "#{self.type}*" @visibility = [:public, :private, :static].include?(visibility) ? visibility : raise("unsupported visibility") # Canonic special method signatures @signature = { :ctor => Function::Signature.new([type^:self]), :dtor => Function::Signature.new([type^:self]), :copy => Function::Signature.new([type^:dst, type^:src]), :equal => Function::Signature.new([type^:lt, type^:rt], :int), :identify => Function::Signature.new([type^:self], :size_t), :less => Function::Signature.new([type^:lt, type^:rt], :int), } end |