module
Crygen::Modules::Annotation
Overview
Module that is used to store and add the annotations.
Included Modules
Direct including types
- Crygen::Types::Class
- Crygen::Types::Enum
- Crygen::Types::LibC
- Crygen::Types::Method
- Crygen::Types::Struct
Defined in:
modules/annotation.crInstance Method Summary
-
#add_annotation(annotation_type : Crygen::Types::Annotation) : self
Adds the annotation onto object.
-
#add_annotations(*annotation_type : Crygen::Types::Annotation) : self
Adds annotations onto object.
Instance methods inherited from module Crygen::Helpers::Annotation
always_inline : self
always_inline,
call_convention(name : String) : self
call_convention,
deprecated(message : String) : selfdeprecated : self deprecated, experimental(message : String) : self
experimental : self experimental, extern : self extern, flags : self flags, link(name : String) : self link, no_inline : self no_inline, thread_local : self thread_local
Instance Method Detail
Adds the annotation onto object. Example:
class_type = CGT::Class.new("Person")
class_type.add_annotation(CGT::Annotation.new("Experimental"))
Output:
@[Experimental]
class Person
end
Adds annotations onto object. Example:
class_type = CGT::Class.new("Person")
class_type.add_annotations(
CGT::Annotation.new("Experimental"),
CGT::Annotation.new("AnotherAnnotation")
)
Output:
@[Experimental]
@[AnotherAnnotation]
class Person
end