Class: Rbind::RParameter
- Inherits:
-
RAttribute
- Object
- RBase
- RAttribute
- Rbind::RParameter
- Defined in:
- lib/rbind/core/rparameter.rb
Instance Attribute Summary collapse
-
#default_value(val = nil) ⇒ Object
Returns the value of attribute default_value.
Attributes inherited from RAttribute
Attributes inherited from RBase
#alias, #auto_alias, #cname, #csignature, #flags, #ignore, #name, #namespace, #owner, #signature, #version
Instance Method Summary collapse
- #generate_signatures ⇒ Object
-
#initialize(name, type, default_value = nil, *flags) ⇒ RParameter
constructor
A new instance of RParameter.
- #valid_flags ⇒ Object
Methods inherited from RAttribute
#==, #read_only?, #to_ptr, #write?
Methods inherited from RBase
#add_flag, basename, #binding, #full_name, #ignore?, #map_to_namespace, namespace, #namespace?, normalize, #pretty_print, to_cname, #validate_flags
Constructor Details
#initialize(name, type, default_value = nil, *flags) ⇒ RParameter
Returns a new instance of RParameter.
6 7 8 9 |
# File 'lib/rbind/core/rparameter.rb', line 6 def initialize(name,type,default_value=nil,*flags) super(name,type,*flags) self.default_value = default_value end |
Instance Attribute Details
#default_value(val = nil) ⇒ Object
Returns the value of attribute default_value.
4 5 6 |
# File 'lib/rbind/core/rparameter.rb', line 4 def default_value @default_value end |
Instance Method Details
#generate_signatures ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/rbind/core/rparameter.rb', line 32 def generate_signatures c,cs = super if default_value c = "#{c}=#{default_value}" end [c,cs] end |
#valid_flags ⇒ Object
28 29 30 |
# File 'lib/rbind/core/rparameter.rb', line 28 def valid_flags [:IO,:O] end |