Module variants

Types

Variant = ref object
  godotVariant: GodotVariant
  noDeinit: bool
  Source Edit

Procs

proc markNoDeinit(v: Variant) {.
inline, raises: [], tags: []
.}
Makes it so that internal GodotVariant object will not be destroyed when the reference is gone. Use only if you know what you are doing.   Source Edit
proc godotVariant(v: Variant): ptr GodotVariant {.
inline, raises: [], tags: []
.}
WARNING: do not keep the returned value for longer than the lifetime of v   Source Edit
proc getType(v: Variant): VariantType {.
raises: [], tags: []
.}
  Source Edit
proc variantFinalizer(v: Variant) {.
raises: [], tags: []
.}
  Source Edit
proc `$`(self: Variant): string {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(v: Variant): Variant {.
inline, raises: [], tags: []
.}
Makes a copy   Source Edit
proc newVariant(v: GodotVariant): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(b: bool): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170268: uint8): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170304: uint16): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170340: uint32): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170376: uint64): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170412: uint): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170448: int8): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170484: int16): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170520: int32): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170556: int64): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(i170592: int): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(r: cdouble): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(s: string): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(v2: Vector2): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(rect2: Rect2): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(v3: Vector3): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(t2d: Transform2D): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(plane: Plane): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(quat: Quat): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(aabb: AABB): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(basis: Basis): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(trans: Transform): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(color: Color): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(nodePath: NodePath): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(godotNodePath: GodotNodePath): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(rid: RID): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(obj: ptr GodotObject): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(pba: PoolByteArray): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(pia: PoolIntArray): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(pra: PoolRealArray): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(psa: PoolStringArray): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(pv2a: PoolVector2Array): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(pv3a: PoolVector3Array): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc newVariant(pca: PoolColorArray): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc asBool(self: Variant): bool {.
inline, raises: [], tags: []
.}
  Source Edit
proc asUInt(self: Variant): uint64 {.
inline, raises: [], tags: []
.}
  Source Edit
proc asInt(self: Variant): int64 {.
inline, raises: [], tags: []
.}
  Source Edit
proc asReal(self: Variant): cdouble {.
inline, raises: [], tags: []
.}
  Source Edit
proc asString(self: Variant): string {.
inline, raises: [], tags: []
.}
  Source Edit
proc asVector2(self: Variant): Vector2 {.
inline, raises: [], tags: []
.}
  Source Edit
proc asRect2(self: Variant): Rect2 {.
inline, raises: [], tags: []
.}
  Source Edit
proc asVector3(self: Variant): Vector3 {.
inline, raises: [], tags: []
.}
  Source Edit
proc asTransform2D(self: Variant): Transform2D {.
inline, raises: [], tags: []
.}
  Source Edit
proc asPlane(self: Variant): Plane {.
inline, raises: [], tags: []
.}
  Source Edit
proc asQuat(self: Variant): Quat {.
inline, raises: [], tags: []
.}
  Source Edit
proc asAABB(self: Variant): AABB {.
inline, raises: [], tags: []
.}
  Source Edit
proc asBasis(self: Variant): Basis {.
inline, raises: [], tags: []
.}
  Source Edit
proc asTransform(self: Variant): Transform {.
inline, raises: [], tags: []
.}
  Source Edit
proc asColor(self: Variant): Color {.
inline, raises: [], tags: []
.}
  Source Edit
proc asNodePath(self: Variant): NodePath {.
inline, raises: [], tags: []
.}
  Source Edit
proc asRID(self: Variant): RID {.
inline, raises: [], tags: []
.}
  Source Edit
proc asGodotObject(self: Variant): ptr GodotObject {.
inline, raises: [], tags: []
.}
  Source Edit
proc asPoolByteArray(self: Variant): PoolByteArray {.
inline, raises: [Exception], tags: [RootEffect]
.}
  Source Edit
proc asPoolIntArray(self: Variant): PoolIntArray {.
inline, raises: [Exception], tags: [RootEffect]
.}
  Source Edit
proc asPoolRealArray(self: Variant): PoolRealArray {.
inline, raises: [Exception], tags: [RootEffect]
.}
  Source Edit
proc asPoolStringArray(self: Variant): PoolStringArray {.
inline, raises: [Exception], tags: [RootEffect]
.}
  Source Edit
proc asPoolVector2Array(self: Variant): PoolVector2Array {.
inline, raises: [Exception], tags: [RootEffect]
.}
  Source Edit
proc asPoolVector3Array(self: Variant): PoolVector3Array {.
inline, raises: [Exception], tags: [RootEffect]
.}
  Source Edit
proc asPoolColorArray(self: Variant): PoolColorArray {.
inline, raises: [Exception], tags: [RootEffect]
.}
  Source Edit
proc hash(self: Variant): Hash {.
raises: [Exception], tags: [RootEffect]
.}
  Source Edit
proc newVariant(arr: Array): Variant {.
inline, raises: [], tags: []
.}
  Source Edit
proc asArray(self: Variant): Array {.
inline, raises: [], tags: []
.}
  Source Edit
proc hasMethod(self: Variant; meth: string): bool {.
raises: [], tags: []
.}
  Source Edit
proc `==`(self, other: Variant): bool {.
raises: [], tags: []
.}
  Source Edit
proc `<`(self, other: Variant): bool {.
raises: [], tags: []
.}
  Source Edit
proc hashCompare(self, other: Variant): bool {.
raises: [], tags: []
.}
  Source Edit
proc booleanize(self: Variant): bool {.
raises: [], tags: []
.}
  Source Edit