Class: FFI::Clang::TParamCommandComment

Inherits:
Comment
  • Object
show all
Defined in:
lib/ffi/clang/comment.rb

Overview

Represents a template parameter documentation command (e.g., tparam).

Instance Method Summary collapse

Methods inherited from Comment

build_from, #child, #children, #each, #has_trailing_newline?, #initialize, #kind, #num_children, #whitespace?

Constructor Details

This class inherits a constructor from FFI::Clang::Comment

Instance Method Details

#depthObject

Get the nesting depth of this template parameter.



316
317
318
# File 'lib/ffi/clang/comment.rb', line 316

def depth
  Lib.tparam_command_comment_get_depth(@comment)
end

#index(depth = 0) ⇒ Object

Get the index of this template parameter at the specified depth.



323
324
325
# File 'lib/ffi/clang/comment.rb', line 323

def index(depth = 0)
  Lib.tparam_command_comment_get_index(@comment, depth)
end

#nameObject

Get the template parameter name being documented.



304
305
306
# File 'lib/ffi/clang/comment.rb', line 304

def name
  Lib.extract_string Lib.tparam_command_comment_get_param_name(@comment)
end

#textObject Also known as: comment

Get the documentation text for this template parameter.



297
298
299
# File 'lib/ffi/clang/comment.rb', line 297

def text
  self.child.text
end

#valid_position?Boolean

Check if the parameter position is valid.



310
311
312
# File 'lib/ffi/clang/comment.rb', line 310

def valid_position?
  Lib.tparam_command_comment_is_param_position_valid(@comment) != 0
end