NodObjC
The NodeJS ⇆ Objective-C Bridge
Ivar
Represents an Objective-C class "ivar", or instance variable.
wrap()
This is a private function used internally by
NodObjC. You should not need to use this function in
your code.Wraps a Pointer that should be an Objective-C ivar (instance variable),
and returns a new Ivar instance.
function wrap (pointer) {
if (pointer.isNull()) return null
return new Ivar(pointer)
}Ivar()
This is a private function used internally by
NodObjC. You should not need to use this function in
your code.The Ivar Class. Wrapper around an Objective-C ivar pointer.
function Ivar (pointer) {
this.pointer = pointer
}Ivar#getName()
Returns the name of the Ivar.
proto.getName = function getName () {
return core.ivar_getName(this.pointer)
}Ivar#getOffset()
Returns the offset of the Ivar. This is the offset in bytes that the instance
variable resides in the object's layout in memory.
proto.getOffset = function getOffset () {
return core.ivar_getOffset(this.pointer)
}Ivar#getTypeEncoding()
Returns the "type encoding" of the Ivar.
proto.getTypeEncoding = function getTypeEncoding () {
return core.ivar_getTypeEncoding(this.pointer)
}Ivar#toString()
toString() override.
proto.toString = function toString () {
return '[Ivar: ' + [ this.getName()
, this.getTypeEncoding()
, this.getOffset()].join(', ') +']'
}
proto.inspect = function inspect () {
// red
return '\033[31m' + this.toString() + '\033[39m'
}