Class: Assimp::LogStream

Inherits:
FFI::Struct
  • Object
show all
Extended by:
StructAccessors
Defined in:
lib/assimp/import.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from StructAccessors

extended, has_ref?, struct_array_attr_accessor, struct_array_attr_checker, struct_array_attr_reader, struct_array_attr_writer, struct_attr_accessor, struct_attr_reader, struct_attr_writer, struct_ref_array_attr_accessor, struct_ref_array_attr_reader, struct_ref_array_attr_writer

Class Method Details

.debuggerObject



16
17
18
# File 'lib/assimp/import.rb', line 16

def self.debugger
  Assimp::aiGetPredefinedLogStream(:DEBUGGER, nil)
end

.detach_allObject



11
12
13
14
# File 'lib/assimp/import.rb', line 11

def self.detach_all
  Assimp::aiDetachAllLogStreams
  self
end

.error_stringObject



37
38
39
# File 'lib/assimp/import.rb', line 37

def self.error_string
  Assimp::aiGetErrorString
end

.file(path) ⇒ Object



20
21
22
# File 'lib/assimp/import.rb', line 20

def self.file(path)
  Assimp::aiGetPredefinedLogStream(:FILE, path)
end

.stderrObject



28
29
30
# File 'lib/assimp/import.rb', line 28

def self.stderr
  Assimp::aiGetPredefinedLogStream(:STDERR, nil)
end

.stdoutObject



24
25
26
# File 'lib/assimp/import.rb', line 24

def self.stdout
  Assimp::aiGetPredefinedLogStream(:STDOUT, nil)
end

.verbose(bool) ⇒ Object



32
33
34
35
# File 'lib/assimp/import.rb', line 32

def self.verbose(bool)
  Assimp::aiEnableVerboseLogging(bool)
  self
end

Instance Method Details

#attach(&block) ⇒ Object



46
47
48
49
50
51
52
# File 'lib/assimp/import.rb', line 46

def attach(&block)
  if block_given?
    @block = FFI::Function.new(:void, [:string, :string], &block)
    self.callback = @block
  end
  Assimp::aiAttachLogStream(self)
end

#callback=(c) ⇒ Object



54
55
56
57
# File 'lib/assimp/import.rb', line 54

def callback=(c)
  @block = c
  self[:callback] = c
end

#detachObject



59
60
61
# File 'lib/assimp/import.rb', line 59

def detach
  Assimp::aiDetachLogStream(self)
end

#user=(mess) ⇒ Object



41
42
43
44
# File 'lib/assimp/import.rb', line 41

def user=(mess)
  @user = FFI::MemoryPointer.from_string(mess)
  self[:user] = @user
end