Visitor for a specific languages. Works kinda like a Phase and is executed

by a Phase.

Introduced properties

private var _ffi_language_assignation_phase: FFILanguageAssignationPhase

nitc :: FFILanguage :: _ffi_language_assignation_phase

FFILanguageAssignationPhase assigning self to AExternCodeBlocks
abstract fun compile_callback(callback: NitniCallback, mmodule: MModule, mainmmodule: MModule, ecc: CCompilationUnit)

nitc :: FFILanguage :: compile_callback

Generate the code to offer this callback if foreign code
abstract fun compile_extern_class(block: AExternCodeBlock, m: AClassdef, ecc: CCompilationUnit, mmodule: MModule)

nitc :: FFILanguage :: compile_extern_class

Generate wrapper code for this extern class
abstract fun compile_extern_method(block: AExternCodeBlock, m: AMethPropdef, ecc: CCompilationUnit, nmodule: MModule)

nitc :: FFILanguage :: compile_extern_method

Generate wrapper code for this extern method
abstract fun compile_module_block(block: AExternCodeBlock, ecc: CCompilationUnit, mmodule: MModule)

nitc :: FFILanguage :: compile_module_block

Generate wrapper code for this module/header code block
fun compile_to_files(mmodule: MModule, directory: String)

nitc :: FFILanguage :: compile_to_files

Complete compilation of generated code
init defaultinit(ffi_language_assignation_phase: FFILanguageAssignationPhase)

nitc :: FFILanguage :: defaultinit

fun ffi_language_assignation_phase: FFILanguageAssignationPhase

nitc :: FFILanguage :: ffi_language_assignation_phase

FFILanguageAssignationPhase assigning self to AExternCodeBlocks
protected fun ffi_language_assignation_phase=(ffi_language_assignation_phase: FFILanguageAssignationPhase)

nitc :: FFILanguage :: ffi_language_assignation_phase=

FFILanguageAssignationPhase assigning self to AExternCodeBlocks
abstract fun get_ftype(block: AExternCodeBlock, m: AClassdef): ForeignType

nitc :: FFILanguage :: get_ftype

Get the foreign type of this extern class definition
abstract fun identify_language(block: AExternCodeBlock): Bool

nitc :: FFILanguage :: identify_language

Is this block written in this language?

Redefined properties

redef type SELF: FFILanguage

nitc $ FFILanguage :: SELF

Type of this instance, automatically specialized in every class
redef init init

nitc $ FFILanguage :: init

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
private var _ffi_language_assignation_phase: FFILanguageAssignationPhase

nitc :: FFILanguage :: _ffi_language_assignation_phase

FFILanguageAssignationPhase assigning self to AExternCodeBlocks
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
abstract fun compile_callback(callback: NitniCallback, mmodule: MModule, mainmmodule: MModule, ecc: CCompilationUnit)

nitc :: FFILanguage :: compile_callback

Generate the code to offer this callback if foreign code
abstract fun compile_extern_class(block: AExternCodeBlock, m: AClassdef, ecc: CCompilationUnit, mmodule: MModule)

nitc :: FFILanguage :: compile_extern_class

Generate wrapper code for this extern class
abstract fun compile_extern_method(block: AExternCodeBlock, m: AMethPropdef, ecc: CCompilationUnit, nmodule: MModule)

nitc :: FFILanguage :: compile_extern_method

Generate wrapper code for this extern method
abstract fun compile_module_block(block: AExternCodeBlock, ecc: CCompilationUnit, mmodule: MModule)

nitc :: FFILanguage :: compile_module_block

Generate wrapper code for this module/header code block
fun compile_to_files(mmodule: MModule, directory: String)

nitc :: FFILanguage :: compile_to_files

Complete compilation of generated code
init defaultinit(ffi_language_assignation_phase: FFILanguageAssignationPhase)

nitc :: FFILanguage :: defaultinit

fun ffi_language_assignation_phase: FFILanguageAssignationPhase

nitc :: FFILanguage :: ffi_language_assignation_phase

FFILanguageAssignationPhase assigning self to AExternCodeBlocks
protected fun ffi_language_assignation_phase=(ffi_language_assignation_phase: FFILanguageAssignationPhase)

nitc :: FFILanguage :: ffi_language_assignation_phase=

FFILanguageAssignationPhase assigning self to AExternCodeBlocks
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
abstract fun get_ftype(block: AExternCodeBlock, m: AClassdef): ForeignType

nitc :: FFILanguage :: get_ftype

Get the foreign type of this extern class definition
fun hash: Int

core :: Object :: hash

The hash code of the object.
abstract fun identify_language(block: AExternCodeBlock): Bool

nitc :: FFILanguage :: identify_language

Is this block written in this language?
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram nitc::FFILanguage FFILanguage core::Object Object nitc::FFILanguage->core::Object nitc::CLanguage CLanguage nitc::CLanguage->nitc::FFILanguage nitc::CPPLanguage CPPLanguage nitc::CPPLanguage->nitc::FFILanguage nitc::JavaLanguage JavaLanguage nitc::JavaLanguage->nitc::FFILanguage nitc::ObjCLanguage ObjCLanguage nitc::ObjCLanguage->nitc::FFILanguage

Parents

interface Object

core :: Object

The root of the class hierarchy.

Children

class ObjCLanguage

nitc :: ObjCLanguage

The Objective-C langugage visitor

Class definitions

nitc $ FFILanguage
# Visitor for a specific languages. Works kinda like a `Phase` and is executed
# by a `Phase`.
class FFILanguage
	# `FFILanguageAssignationPhase` assigning `self` to `AExternCodeBlock`s
	var ffi_language_assignation_phase: FFILanguageAssignationPhase

	init
	do
		ffi_language_assignation_phase.languages.add(self)
	end

	# Is this `block` written in this language?
	fun identify_language(block: AExternCodeBlock ): Bool is abstract

	# Generate wrapper code for this module/header code block
	fun compile_module_block(block: AExternCodeBlock, ecc: CCompilationUnit, mmodule: MModule) is abstract

	# Generate wrapper code for this extern method
	fun compile_extern_method(block: AExternCodeBlock, m: AMethPropdef,
		ecc: CCompilationUnit, nmodule: MModule) is abstract

	# Generate wrapper code for this extern class
	fun compile_extern_class(block: AExternCodeBlock, m: AClassdef,
		ecc: CCompilationUnit, mmodule: MModule) is abstract

	# Get the foreign type of this extern class definition
	fun get_ftype(block: AExternCodeBlock, m: AClassdef): ForeignType is abstract

	# Complete compilation of generated code
	fun compile_to_files(mmodule: MModule, directory: String) do end
end
src/ffi/light_ffi_base.nit:106,1--136,3

nitc :: ffi_base $ FFILanguage
# Visitor for a specific languages. Works kinda like a `Phase` and is executed
# by a `Phase`.
redef class FFILanguage
	# Generate the code to offer this callback if foreign code
	fun compile_callback(callback: NitniCallback, mmodule: MModule,
		mainmmodule: MModule, ecc: CCompilationUnit) is abstract
end
src/ffi/ffi_base.nit:32,1--38,3