Core Library API - brombres/Rogue GitHub Wiki

Boxed.rogue

class Boxed

extends Object

Methods

Signature Return Type Description
size() Int
to<<String>>() String

class Boxed<<$DataType>>

extends Boxed

Properties

Name Type Description
value $DataType

Methods

Signature Return Type Description
init( value:$DataType )
description() String
size() Int
to<<$DataType>>() $DataType

Dim.rogue

routine Dim<<$DataType>>( n:Int32 )

Exception.rogue

class AssertionError

extends Error

Properties

Name Type Description
message String
stack_trace StackTrace

class Error

extends Exception

Properties

Name Type Description
message String
stack_trace StackTrace

class Exception

extends Object

Global Methods

Signature Return Type Description
display( err:Exception )

Properties

Name Type Description
message String
stack_trace StackTrace

Methods

Signature Return Type Description
init( message:String )
display()
init_object()
save_stack_trace()
to<<String>>() String

class IOError

extends Error

Properties

Name Type Description
message String
stack_trace StackTrace

class OutOfBoundsError

extends Error

Properties

Name Type Description
message String
stack_trace StackTrace

Methods

Signature Return Type Description
init( index:Int32, limit:Int32 )
init( message:String )

class UnsupportedOperationError

extends Error

Properties

Name Type Description
message String
stack_trace StackTrace

Methods

Signature Return Type Description
init()
init( operation_name:String )

Global.rogue

class Global [singleton]

extends Object

incorporates PrintWriter, BufferedPrintWriter<<$buffer>>

Global Methods

Signature Return Type Description
call_exit_functions() Called by the native layer when the program is ending normally or exiting due to a System.exit(Int32) call. Ensure these functions won't be called multiple times
on_control_c( signum:Int32 )
on_segmentation_fault( signum:Int32 )

Properties

Name Type Description
error PrintWriter
exit_functions Function())[
global_output_buffer String
log PrintWriter
output PrintWriter

Methods

Signature Return Type Description
init()
abs( n:BigInt ) BigInt
close()
configure_standard_output()
flush()
flush( buffer:String )
indent() Int
is_even( n:BigInt ) Logical
is_odd( n:BigInt ) Logical
on_exit( fn:Function() )
print( value:Byte )
print( value:Character )
print( value:Int32 )
print( value:Int64 )
print( value:Logical )
print( value:Object )
print( value:Real64 )
print( value:Real64, decimal_places:Int32 )
print( value:String )
println()
println( value:Byte )
println( value:Character )
println( value:Int32 )
println( value:Int64 )
println( value:Logical )
println( value:Object )
println( value:Real64 )
println( value:Real64, decimal_places:Int32 )
println( value:String )
set_indent( new_indent:Int )

GlobalID.rogue

enum GlobalID

incorporates CommonCompoundMethods

Description

CATEGORIES are generated by compiler.

Categories

Category Value Description
<RangeUpTo> 1
<RangeUpToLessThan> 2
<RangeDownTo> 3
<RangeDownToGreaterThan> 4
<Default> 5
<discard_leading_whitespace> 6
<non_whitespace> 7
<whitespace_run> 8
<HOMEDRIVE> 9
<HOMEPATH> 10
<HOME> 11
<x> 12
<y> 13
<position> 14
<width> 15
<height> 16
<w> 17
<h> 18
<size> 19
<list> 20
<index> 21
<table> 22
<key> 23
<Undefined> 24
<COLORTERM> 25
<ENTER> 26
<LEAVE> 27
<MOVE> 28
<PRESS> 29
<RELEASE> 30
<DRAG_START> 31
<DRAG_MOVE> 32
<DRAG_STOP> 33
<TextField.on_value_changed> 34
<TextField.on_commit> 35
<LEFT> 36
<local_id_start> 37
<local_id> 38
<local_dot> 39
<plus> 40
<domain_id_start> 41
<tag> 42
<domain_id> 43
<domain_id_hyphen> 44
<domain_id_dot> 45

Global Properties

Name Type Description
categories GlobalID[]
lookup [String:GlobalID]

Global Methods

Signature Return Type Description
create( name:String ) GlobalID
create( value:Int ) GlobalID
find( name:String ) GlobalID?

Properties

Name Type Description
value Int

Methods

Signature Return Type Description
description() String
disconnect_signal_group()
disconnect_signals()
disconnect_signal( connection:SignalConnection )
disconnect_signals( group:SignalID )
hashcode() Int
name() String
on_signal( callback:Function(), &once ) SignalConnection
on_signal( callback:Function(), group:SignalID, &once ) SignalConnection
on_signal( callback:Function(Variant), &once ) SignalConnection
on_signal( callback:Function(Variant), group:SignalID, &once ) SignalConnection
operator?() Logical
operator==( other:GlobalID ) Logical
print_to( buffer:PrintWriter )
signal( [args=undefined:Variant] )
to<<Int>>() Int
to<<Object>>() Object
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class GlobalIDSegmentParser [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( id:GlobalID ) GlobalIDSegmentParser
create( id:String, [next_i=1:Int] ) GlobalIDSegmentParser

Properties

Name Type Description
id String
next_i Int

Methods

Signature Return Type Description
description() String
operator==( other:GlobalIDSegmentParser ) Logical
print_to( buffer:PrintWriter )
read_another( [buffer=String():String] ) Logical
to<<Object>>() Boxed<<GlobalIDSegmentParser>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

Object.rogue

class Object

Methods

Signature Return Type Description
description() String
hash_code() Int32 deprecated in favor of .hashcode()
hashcode() Int
library_name() String
object_id() Int64
operator==( other:Object ) Logical
poison_object()
print_to( buffer:PrintWriter )
release_object() Increments an internal reference count. When the reference count reaches zero and this object is no longer visible to Rogue, it will be garbage-collected at some future point. This call does not itself trigger a garbage collection.
retain_object() Increments an internal reference count that prevents this object from being garbage-collected when no longer visible to Rogue.
to<<String>>() String
to<<Variant>>() Variant
type_id() TypeID
type_info() TypeInfo
type_info_index() Int
type_name() String
write_json( builder:JSON, &formatted, &omit_commas, &ending_newline=true )

Optional.rogue

class Optional<<$DataType>> [compound]

augments Optional<<$DataType>>

incorporates OptionalType, CommonCompoundMethods

Global Methods

Signature Return Type Description
create() Optional<<$DataType>>
create( value:$DataType, [exists=true:Logical] ) Optional<<$DataType>>
create_from( value:Variant ) Optional<<$DataType>>

Properties

Name Type Description
exists Logical
value $DataType

Methods

Signature Return Type Description
description() String
operator==( other:Optional<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<$DataType?>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class OptionalType [aspect]

Primitives.rogue

class Byte [primitive]

incorporates CommonPrimitiveMethods, CommonPrimitiveMethods<<$DataType>>

Methods

Signature Return Type Description
abs() Byte
clamped( low:Byte, high:Byte ) Byte
clamped_high( high:Byte ) Byte
clamped_low( low:Byte ) Byte
description() String
digit_count() Int
format( fmt:String ) String fmt
  SYNTAX: [+|-|0|,|%][N][,]

  C-esque "[attributes][N]" - most attributes must come
  before optional "N" but can otherwise be in any order.
  [,|x|b] can come at beginning or at end.

  'N' - Minimum whole digits before decimal point
  '.' - Include decimal (fractional) value in output.
  'D' - Number of digits after decimal point.

  'b' - Format in base 2 (binary).
  'x' - Format in base 16 (hexadecimal).
  '+' - Always add leading +/- sign.
  ' ' - Insert any padding between sign and number.
  '0' - Pad whole portion with 0's instead of spaces.
  ',' - Add commas.
hashcode() Int
is_between( low:Byte, high:Byte, &exclusive ) Logical Returns true if this value is between low and high. Inclusive unless 'exclusive' flag is 'true'.
minimum_bits() Int
operator%( other:Byte ) Byte
operator:>>:( bits:Int32 ) Byte
or_larger( other:Byte ) Byte
or_smaller( other:Byte ) Byte
print_to( buffer:PrintWriter )
sign() Byte
signed() Int
to<<Object>>() Object
to<<String>>() String
to<<String>>( [digits=0:Int], &binary, &hex, &octal ) String
type_info() TypeInfo

class Character [primitive]

incorporates CommonPrimitiveMethods

Methods

Signature Return Type Description
description() String
equals( other:Character, &ignore_case ) Logical
hashcode() Int
is_alphanumeric() Logical
is_base64_digit() Logical
is_letter() Logical
is_lowercase() Logical
is_uppercase() Logical
is_identifier( [additional_characters="":String] ) Logical
is_identifier_start( [additional_characters="":String] ) Logical
is_number( [base=10:Int] ) Logical
minimum_bits() Int
operator%( other:Character ) Int32
operator:>>:( bits:Int32 ) Int32
print_escaped_ascii( [additional_characters_to_escape="":String], [writer=Global:PrintWriter] )
print_escaped_unicode( [additional_characters_to_escape="":String], [writer=Global:PrintWriter] )
print_to( buffer:PrintWriter )
to<<String>>() String
to_base64_value() Int32
to_lowercase() Character
to_uppercase() Character
to<<String>>( [digits=0:Int], &binary, &hex, &octal ) String
to_escaped_ascii( [additional_characters_to_escape="":String] ) String
to_escaped_unicode( [additional_characters_to_escape="":String] ) String
to_number( [base=10:Int] ) Int
type_info() TypeInfo

class CommonCompoundMethods [aspect]

Methods

Signature Return Type Description
type_info() TypeInfo

class CommonPrimitiveMethods [aspect]

Methods

Signature Return Type Description
type_info() TypeInfo

class CommonPrimitiveMethods<<$DataType>> [aspect]

augments CommonPrimitiveMethods<<$DataType>>

incorporates CommonPrimitiveMethods

Methods

Signature Return Type Description
abs() $DataType
clamped( low:$DataType, high:$DataType ) $DataType
clamped_high( high:$DataType ) $DataType
clamped_low( low:$DataType ) $DataType
description() String
digit_count() Int
is_between( low:$DataType, high:$DataType, &exclusive ) Logical Returns true if this value is between low and high. Inclusive unless 'exclusive' flag is 'true'.
or_larger( other:$DataType ) $DataType
or_smaller( other:$DataType ) $DataType
sign() $DataType
to<<Object>>() Object
type_info() TypeInfo

class Int [primitive]

incorporates CommonPrimitiveMethods, CommonPrimitiveMethods<<$DataType>>

Methods

Signature Return Type Description
abs() Int
clamped( low:Int, high:Int ) Int
clamped_high( high:Int ) Int
clamped_low( low:Int ) Int
description() String
digit_count() Int
format( fmt:String ) String fmt
  SYNTAX: [+|-|0|,|%][N][,]

  C-esque "[attributes][N]" - most attributes must come
  before optional "N" but can otherwise be in any order.
  [,|x|b] can come at beginning or at end.

  'N' - Minimum whole digits before decimal point
  '.' - Include decimal (fractional) value in output.
  'D' - Number of digits after decimal point.

  'b' - Format in base 2 (binary).
  'x' - Format in base 16 (hexadecimal).
  '+' - Always add leading +/- sign.
  ' ' - Insert any padding between sign and number.
  '0' - Pad whole portion with 0's instead of spaces.
  ',' - Add commas.
hashcode() Int
is_between( low:Int, high:Int, &exclusive ) Logical Returns true if this value is between low and high. Inclusive unless 'exclusive' flag is 'true'.
minimum_bits() Int
operator%( other:Int ) Int
operator:>>:( bits:Int ) Int
or_larger( other:Int ) Int
or_smaller( other:Int ) Int
print_power_of_2( base:Int, digits:Int, buffer:PrintWriter ) PrintWriter
print_to( buffer:PrintWriter )
progress( a:Int, b:Int, &clamp=true ) Real Returns the progress of this number along the interval from a to b. Examples:
  1.progress(1,5) -> 0.00
  2.progress(1,5) -> 0.25
  3.progress(1,5) -> 0.50
  4.progress(1,5) -> 0.75
  5.progress(1,5) -> 1.00
  2.progress(5,1) -> 0.75
real_bits() Real64
rol( nbits:Int ) Int
ror( nbits:Int ) Int
sign() Int
sqrt() Int
th() String Returns Nst, Nnd, Nrd, Nth as appropriate Example:
  local n = 23
  println n.th # 23rd
to<<Object>>() Object
to<<String>>() String
to_power_of_2() Int
to<<String>>( [digits=0:Int], &binary, &hex, &octal ) String
to_digit( &base64 ) Character
type_info() TypeInfo

class Int32 [primitive]

incorporates CommonPrimitiveMethods, CommonPrimitiveMethods<<$DataType>>

Methods

Signature Return Type Description
abs() Int32
clamped( low:Int32, high:Int32 ) Int32
clamped_high( high:Int32 ) Int32
clamped_low( low:Int32 ) Int32
description() String
digit_count() Int
format( fmt:String ) String fmt
  SYNTAX: [+|-|0|,|%][N][,]

  C-esque "[attributes][N]" - most attributes must come
  before optional "N" but can otherwise be in any order.
  [,|x|b] can come at beginning or at end.

  'N' - Minimum whole digits before decimal point
  '.' - Include decimal (fractional) value in output.
  'D' - Number of digits after decimal point.

  'b' - Format in base 2 (binary).
  'x' - Format in base 16 (hexadecimal).
  '+' - Always add leading +/- sign.
  ' ' - Insert any padding between sign and number.
  '0' - Pad whole portion with 0's instead of spaces.
  ',' - Add commas.
hashcode() Int
is_between( low:Int32, high:Int32, &exclusive ) Logical Returns true if this value is between low and high. Inclusive unless 'exclusive' flag is 'true'.
minimum_bits() Int
operator%( other:Int32 ) Int32
operator:>>:( bits:Int32 ) Int32
or_larger( other:Int32 ) Int32
or_smaller( other:Int32 ) Int32
print_power_of_2( base:Int, digits:Int, buffer:PrintWriter ) PrintWriter
print_to( buffer:PrintWriter )
progress( a:Int32, b:Int32, &clamp=true ) Real Returns the progress of this number along the interval from a to b. Examples:
  1.progress(1,5) -> 0.00
  2.progress(1,5) -> 0.25
  3.progress(1,5) -> 0.50
  4.progress(1,5) -> 0.75
  5.progress(1,5) -> 1.00
  2.progress(5,1) -> 0.75
real_bits() Real32
rol( nbits:Int32 ) Int32
ror( nbits:Int32 ) Int32
sign() Int32
sqrt() Int32
th() String Returns Nst, Nnd, Nrd, Nth as appropriate Example:
  local n = 23
  println n.th # 23rd
to<<Object>>() Object
to<<String>>() String
to_power_of_2() Int32
to<<Int64>>( unsigned:Logical ) Int64
to<<String>>( [digits=0:Int], &binary, &hex, &octal ) String
to_digit( &base64 ) Character
type_info() TypeInfo

class Int64 [primitive]

incorporates CommonPrimitiveMethods, CommonPrimitiveMethods<<$DataType>>

Methods

Signature Return Type Description
abs() Int64
clamped( low:Int64, high:Int64 ) Int64
clamped_high( high:Int64 ) Int64
clamped_low( low:Int64 ) Int64
description() String
digit_count() Int
format( fmt:String, [bits=64:Int] ) String fmt
  SYNTAX: [+|-|0|,|%][N][,]

  C-esque "[attributes][N]" - most attributes must come
  before optional "N" but can otherwise be in any order.
  [,|x|b] can come at beginning or at end.

  'N' - Minimum whole digits before decimal point
  '.' - Include decimal (fractional) value in output.
  'D' - Number of digits after decimal point.

  'b' - Format in base 2 (binary).
  'x' - Format in base 16 (hexadecimal).
  '+' - Always add leading +/- sign.
  ' ' - Insert any padding between sign and number.
  '0' - Pad whole portion with 0's instead of spaces.
  ',' - Add commas.
hashcode() Int
is_between( low:Int64, high:Int64, &exclusive ) Logical Returns true if this value is between low and high. Inclusive unless 'exclusive' flag is 'true'.
minimum_bits() Int
operator%( other:Int64 ) Int64
operator:>>:( bits:Int64 ) Int64
or_larger( other:Int64 ) Int64
or_smaller( other:Int64 ) Int64
print_power_of_2( base:Int, digits:Int, buffer:PrintWriter ) PrintWriter
print_to( buffer:PrintWriter )
progress( a:Int64, b:Int64, &clamp=true ) Real Returns the progress of this number along the interval from a to b. Examples:
  1.progress(1,5) -> 0.00
  2.progress(1,5) -> 0.25
  3.progress(1,5) -> 0.50
  4.progress(1,5) -> 0.75
  5.progress(1,5) -> 1.00
  2.progress(5,1) -> 0.75
real_bits() Real64
rol( nbits:Int ) Int64
ror( nbits:Int ) Int64
sign() Int64
sqrt() Int64
th() String Returns Nst, Nnd, Nrd, Nth as appropriate Example:
  local n = 23
  println n.th # 23rd
to<<Object>>() Object
to<<String>>() String
to_power_of_2() Int64
to<<String>>( [digits=0:Int], &binary, &hex, &octal ) String
to_digit( &base64 ) Character
type_info() TypeInfo

class Logical [primitive]

incorporates CommonPrimitiveMethods

Methods

Signature Return Type Description
description() String
hashcode() Int
print_to( buffer:PrintWriter )
to<<Object>>() Object
to<<String>>() String
type_info() TypeInfo

class PrimitiveFormat [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( fmt:String ) PrimitiveFormat
create( n:Int, d:Int, sign:Logical, spaces:Logical, zeros:Logical, commas:Logical, binary:Logical, hex:Logical, percent:Logical ) PrimitiveFormat

Properties

Name Type Description
binary Logical
commas Logical
d Int
hex Logical
n Int
percent Logical
sign Logical
spaces Logical
zeros Logical

Methods

Signature Return Type Description
description() String
fill() Character
operator==( other:PrimitiveFormat ) Logical
print_to( buffer:PrintWriter )
subset( &n, &sign, &spaces, &zeros, &commas ) PrimitiveFormat
to<<Object>>() Boxed<<PrimitiveFormat>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class Real [primitive]

incorporates CommonPrimitiveMethods, CommonPrimitiveMethods<<$DataType>>

Methods

Signature Return Type Description
abs() Real
acos() Real
asin() Real
atan() Real
atan2( x:Real ) Real Equivalent to atan2(this,x)
ceiling() Real
clamped( low:Real, high:Real ) Real
clamped_high( high:Real ) Real
clamped_low( low:Real ) Real
cos() Real
cube_root() Real
description() String
digit_count() Int
exp() Real
floor() Real
format( fmt:String ) String fmt
  SYNTAX: [+|-|0|,|%][N][.D][%|,]
  C-esque "[attributes][N][.D]" - most attributes must come
  before optional "N.D" but can otherwise be in any order.
  '%' and ',' can come at beginning or at end.

  'N' - Minimum whole digits before decimal point
  '.' - Include decimal (fractional) value in output.
  'D' - Number of digits after decimal point.

  '+' - Always add leading +/- sign.
  ' ' - Insert any padding between sign and number.
  '0' - Pad whole portion with 0's instead of spaces
  ',' - Add commas.
  '%' - Format as percent with implied value = value * 100.
hashcode() Int
integer_bits() Int64
is_infinite() Logical Returns true for positive OR negative infinity
is_NaN() Logical
is_between( low:Real, high:Real, &exclusive ) Logical Returns true if this value is between low and high. Inclusive unless 'exclusive' flag is 'true'.
is_string_accurate_at( decimal_places:Int, [buffer=null:String] ) Logical
lerp( a:Box, b:Box ) Box
lerp( a:Color, b:Color ) Color
lerp( a:Int, b:Int ) Int Assumes this Real is a progress value in the 0.0 to 1.0 range. Returns the position from 'a' to 'b' based on this progress.
lerp( a:Real, b:Real ) Real Assumes this Real is a progress value in the 0.0 to 1.0 range. Returns the position from 'a' to 'b' based on this progress.
lerp( a:XY, b:XY ) XY
lerp( a:XYZ, b:XYZ ) XYZ
log() Real
log10() Real
log2() Real
operator%( other:Real ) Real
or_larger( other:Real ) Real
or_smaller( other:Real ) Real
print_to( buffer:PrintWriter )
print_to( buffer:PrintWriter, decimal_places:Int ) decimal_places
  -1 - minimum required to keep precision
   0 - none (and no decimal point)
  >0 - decimal point + specified number of decimal digits
progress( a:Real, b:Real, &clamp=true ) Real Returns the progress of this number along the interval from a to b. Examples:
  pi.progress(0,2*pi) -> 0.5
round() Real
sign() Real
sin() Real
sqrt() Real
tan() Real
to<<Object>>() Object
to<<String>>() String
to<<String>>( decimal_places:Int ) String
type_info() TypeInfo

class Real32 [primitive]

incorporates CommonPrimitiveMethods, CommonPrimitiveMethods<<$DataType>>

Methods

Signature Return Type Description
abs() Real32
acos() Real32
asin() Real32
atan() Real32
atan2( x:Real32 ) Real32 Equivalent to atan2(this,x)
ceiling() Real32
clamped( low:Real32, high:Real32 ) Real32
clamped_high( high:Real32 ) Real32
clamped_low( low:Real32 ) Real32
cos() Real32
cube_root() Real32
description() String
digit_count() Int
exp() Real32
floor() Real32
format( fmt:String ) String fmt
  SYNTAX: [+|-|0|,|%][N][.D][%|,]
  C-esque "[attributes][N][.D]" - most attributes must come
  before optional "N.D" but can otherwise be in any order.
  '%' and ',' can come at beginning or at end.

  'N' - Minimum whole digits before decimal point
  '.' - Include decimal (fractional) value in output.
  'D' - Number of digits after decimal point.

  '+' - Always add leading +/- sign.
  ' ' - Insert any padding between sign and number.
  '0' - Pad whole portion with 0's instead of spaces
  ',' - Add commas.
  '%' - Format as percent with implied value = value * 100.
hashcode() Int
integer_bits() Int32
is_infinite() Logical Returns true for positive OR negative infinity
is_NaN() Logical
is_between( low:Real32, high:Real32, &exclusive ) Logical Returns true if this value is between low and high. Inclusive unless 'exclusive' flag is 'true'.
is_string_accurate_at( decimal_places:Int, [buffer=null:String] ) Logical
lerp( a:Int, b:Int ) Int Assumes this Real32 is a progress value in the 0.0 to 1.0 range. Returns the position from 'a' to 'b' based on this progress.
lerp( a:Real32, b:Real32 ) Real32 Assumes this Real32 is a progress value in the 0.0 to 1.0 range. Returns the position from 'a' to 'b' based on this progress.
log() Real32
log10() Real32
log2() Real32
operator%( other:Real32 ) Real32
or_larger( other:Real32 ) Real32
or_smaller( other:Real32 ) Real32
print_to( buffer:PrintWriter )
print_to( buffer:PrintWriter, decimal_places:Int ) decimal_places
  -1 - minimum required to keep precision
   0 - none (and no decimal point)
  >0 - decimal point + specified number of decimal digits
progress( a:Real32, b:Real32, &clamp=true ) Real32 Returns the progress of this number along the interval from a to b. Example:
  pi.progress(0,2*pi) -> 0.5
round() Real32
sign() Real32
sin() Real32
sqrt() Real32
tan() Real32
to<<Object>>() Object
to<<String>>() String
to<<String>>( decimal_places:Int ) String
type_info() TypeInfo

class Real64 [primitive]

incorporates CommonPrimitiveMethods, CommonPrimitiveMethods<<$DataType>>

Methods

Signature Return Type Description
abs() Real64
acos() Real64
asin() Real64
atan() Real64
atan2( x:Real64 ) Real64 Equivalent to atan2(this,x)
ceiling() Real64
clamped( low:Real64, high:Real64 ) Real64
clamped_high( high:Real64 ) Real64
clamped_low( low:Real64 ) Real64
cos() Real64
cube_root() Real64
description() String
digit_count() Int
exp() Real64
floor() Real64
format( fmt:String ) String fmt
  SYNTAX: [+|-|0|,|%][N][.D][%|,]
  C-esque "[attributes][N][.D]" - most attributes must come
  before optional "N.D" but can otherwise be in any order.
  '%' and ',' can come at beginning or at end.

  'N' - Minimum whole digits before decimal point
  '.' - Include decimal (fractional) value in output.
  'D' - Number of digits after decimal point.

  '+' - Always add leading +/- sign.
  ' ' - Insert any padding between sign and number.
  '0' - Pad whole portion with 0's instead of spaces
  ',' - Add commas.
  '%' - Format as percent with implied value = value * 100.
hashcode() Int
integer_bits() Int64
is_infinite() Logical Returns true for positive OR negative infinity
is_NaN() Logical
is_between( low:Real64, high:Real64, &exclusive ) Logical Returns true if this value is between low and high. Inclusive unless 'exclusive' flag is 'true'.
is_string_accurate_at( decimal_places:Int, [buffer=null:String] ) Logical
lerp( a:Int, b:Int ) Int Assumes this Real64 is a progress value in the 0.0 to 1.0 range. Returns the position from 'a' to 'b' based on this progress.
lerp( a:Real64, b:Real64 ) Real64 Assumes this Real64 is a progress value in the 0.0 to 1.0 range. Returns the position from 'a' to 'b' based on this progress.
log() Real64
log10() Real64
log2() Real64
operator%( other:Real64 ) Real64
or_larger( other:Real64 ) Real64
or_smaller( other:Real64 ) Real64
print_to( buffer:PrintWriter )
print_to( buffer:PrintWriter, decimal_places:Int ) decimal_places
  -1 - minimum required to keep precision
   0 - none (and no decimal point)
  >0 - decimal point + specified number of decimal digits
progress( a:Real64, b:Real64, &clamp=true ) Real64 Returns the progress of this number along the interval from a to b. Examples:
  pi.progress(0,2*pi) -> 0.5
round() Real64
sign() Real64
sin() Real64
sqrt() Real64
tan() Real64
to<<Object>>() Object
to<<String>>() String
to<<String>>( decimal_places:Int ) String
type_info() TypeInfo

Process.rogue

class PosixProcess

extends Process

Properties

Name Type Description
@native25 RogueCNativeProperty
args String[]
error Logical
error_reader Reader<<Byte>>
exit_code Int
input_writer Writer<<Byte>>
is_blocking Logical
is_finished Logical
output_reader Reader<<Byte>>
result ProcessResult

Methods

Signature Return Type Description
init( args:String[], &readable, &writable, [is_blocking=false:Logical], &env )
init( cmd:String, &readable, &writable, [is_blocking=false:Logical], &env )
finish() ProcessResult
is_finished() Logical
launch( &readable, &writable, &env ) Logical
update_io( &poll_blocks ) Logical Returns true if we should keep updating

class PosixProcessReader

extends Object

incorporates Reader<<$DataType>>

Properties

Name Type Description
fd_reader FDReader
position Int
process Process

Methods

Signature Return Type Description
init( process:Process, fd:Int32 )
close()
has_another() Logical
on_end_use()
on_use() PosixProcessReader
peek() Byte
position() Int
read() Byte
read( buffer:Byte[], limit:Int ) Int
reset()
seek( pos:Int )
skip( n:Int )
to<<Byte[]>>() Byte[]
to<<String>>() String

class Process

extends Object

Global Methods

Signature Return Type Description
create( args:String[], [readable=false:Logical], [writable=false:Logical], [is_blocking=false:Logical], [env=false:Logical] ) Process
create( cmd:String, [readable=false:Logical], [writable=false:Logical], [is_blocking=false:Logical], [env=false:Logical] ) Process
run( args:String[], [env=false:Logical], [writable=false:Logical], [echo=false:Logical] ) ProcessResult
run( cmd:String, [env=false:Logical], [writable=false:Logical], [echo=false:Logical] ) ProcessResult
run( process:Process ) ProcessResult

Properties

Name Type Description
args String[]
error Logical
error_reader Reader<<Byte>>
exit_code Int
input_writer Writer<<Byte>>
is_blocking Logical
is_finished Logical
output_reader Reader<<Byte>>
result ProcessResult

Methods

Signature Return Type Description
close()
error_bytes() Byte[]
error_string() String
exit_code() Int32
finish() ProcessResult
is_finished() Logical
is_running() Logical
launch( &readable, &writable, &env ) Logical
on_cleanup()
output_bytes() Byte[]
output_string() String
run() Int32
update_io( &poll_blocks ) Logical

class ProcessEchoer

extends Object

Properties

Name Type Description
error_buffer Byte[]
error_bytes Byte[]
error_reader Reader<<Byte>>
output_buffer Byte[]
output_bytes Byte[]
output_reader Reader<<Byte>>
process Process

Methods

Signature Return Type Description
init( process:Process )
run() ProcessResult
update_io()

class ProcessResult

extends Object

Properties

Name Type Description
error_bytes Byte[]
error_string String
exit_code Int32
output_bytes Byte[]
output_string String

Methods

Signature Return Type Description
init( exit_code:Int32, output_bytes:Byte[], error_bytes:Byte[] )
error_string() String
output_string() String
success() Logical
to<<Int32>>() Int32
to<<String>>() String

class WindowsProcess

extends Process

Properties

Name Type Description
@native23 RogueCNativeProperty
arg_string_utf16 UTF16String arg_string_utf16 must be kept for the duration of the process; allowing it to be GC'd can crash the process
args String[]
error Logical
error_reader Reader<<Byte>>
exit_code Int
input_writer Writer<<Byte>>
is_blocking Logical
is_finished Logical
output_reader Reader<<Byte>>
process_created Logical
result ProcessResult

Methods

Signature Return Type Description
init( args:String[], &readable, &writable, [is_blocking=false:Logical], &env )
init( cmd:String, &readable, &writable, [is_blocking=false:Logical], &env ) On Windows a cmd like: "space separated.exe" "arg" Must be wrapped in extra quotes: ""space separated.exe" "arg""
finish() ProcessResult
is_finished() Logical
launch( &readable, &writable, &env ) Logical
on_cleanup()
update_io() Logical Returns true if we should keep updating

class WindowsProcessReader

extends Object

incorporates Reader<<$DataType>>

Properties

Name Type Description
@native28 RogueCNativeProperty
buffer Byte[]
position Int

Methods

Signature Return Type Description
init()
close()
fill_buffer() Logical
has_another() Logical
on_end_use()
on_use() WindowsProcessReader
peek() Byte
position() Int
read() Byte
read( buffer:Byte[], limit:Int ) Int
read( buffer:Byte[], limit:Int32 ) Int32
reset()
seek( pos:Int )
skip( n:Int )
to<<Byte[]>>() Byte[]
to<<String>>() String

class WindowsProcessWriter

extends Object

incorporates Writer<<$DataType>>

Properties

Name Type Description
@native29 RogueCNativeProperty
buffer Byte[]
position Int

Methods

Signature Return Type Description
init()
close()
close_pipe()
flush()
on_use() WindowsProcessWriter
on_end_use( err:Exception ) Exception
position() Int
reset()
seek_end()
seek( pos:Int )
seek( pos:Int32 )
skip( n:Int )
skip( n:Int32 )
write( list:Byte[] )
write( value:Byte )

Promise.rogue

class Promise

extends Object

Global Methods

Signature Return Type Description
handler( on_success:Function(Variant)->Variant, on_failure:Function(Exception)->Variant ) PromiseHandler

Properties

Name Type Description
error Exception
handlers PromiseHandler[]
result Variant
state PromiseState

Methods

Signature Return Type Description
init( callback:Function((Function(Variant)->Variant)) )
init( callback:Function((Function(Variant)->Variant),(Function(Exception)->Variant)) )
execute_handlers()
finally( callback:Function()->Variant ) Promise
is_pending() Logical
is_rejected() Logical
is_resolved() Logical
on_catch( on_failure:Function(Exception)->Variant ) Promise
reject( error:Exception )
rejector() Function(Exception)->Variant
resolve( result:Variant )
resolver() Function(Variant)->Variant
then( on_success:Function(Variant)->Variant, [on_failure=null:Function(Exception)->Variant] ) Promise

class PromiseHandler [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( on_success:Function(Variant)->Variant, on_failure:Function(Exception)->Variant ) PromiseHandler

Properties

Name Type Description
on_failure Function(Exception)->Variant
on_success Function(Variant)->Variant

Methods

Signature Return Type Description
description() String
operator==( other:PromiseHandler ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<PromiseHandler>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

enum PromiseState

incorporates CommonCompoundMethods

Categories

Category Value Description
PENDING 0
RESOLVED 1
REJECTED 2

Global Properties

Name Type Description
categories PromiseState[]

Global Methods

Signature Return Type Description
create( name:String ) PromiseState
create( value:Int ) PromiseState

Properties

Name Type Description
value Int

Methods

Signature Return Type Description
description() String
hashcode() Int
name() String
operator?() Logical
operator==( other:PromiseState ) Logical
print_to( buffer:PrintWriter )
to<<Int>>() Int
to<<Object>>() Object
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

Range.rogue

class Range<<$DataType>> [compound]

augments Range<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( type:GlobalID, first:$DataType, limit:$DataType, step_size:$DataType ) Range<<$DataType>>

Properties

Name Type Description
first $DataType
limit $DataType
step_size $DataType
type GlobalID

Methods

Signature Return Type Description
count() Int
description() String
last() $DataType
operator==( other:Range<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<Range<<$DataType>>>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class RangeDownTo<<$DataType>> [compound]

augments RangeDownTo<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( start:$DataType, limit:$DataType, step:$DataType ) RangeDownTo<<$DataType>>

Properties

Name Type Description
limit $DataType
start $DataType
step $DataType

Methods

Signature Return Type Description
count() Int
description() String
iterator() RangeDownToIterator<<$DataType>>
operator==( other:RangeDownTo<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<$DataType[]>>() List<<$DataType>>
to<<Object>>() Boxed<<RangeDownTo<<$DataType>>>>
to<<Range<<$DataType>>>>() Range<<$DataType>>
to<<String>>() String
to<<Variant>>() Variant
to_list() List<<$DataType>>
type_info() TypeInfo

class RangeDownToGreaterThan<<$DataType>> [compound]

augments RangeDownToGreaterThan<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( start:$DataType, limit:$DataType, step:$DataType ) RangeDownToGreaterThan<<$DataType>>

Properties

Name Type Description
limit $DataType
start $DataType
step $DataType

Methods

Signature Return Type Description
count() Int
description() String
iterator() RangeDownToGreaterThanIterator<<$DataType>>
operator==( other:RangeDownToGreaterThan<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<$DataType[]>>() List<<$DataType>>
to<<Object>>() Boxed<<RangeDownToGreaterThan<<$DataType>>>>
to<<Range<<$DataType>>>>() Range<<$DataType>>
to<<String>>() String
to<<Variant>>() Variant
to_list() List<<$DataType>>
type_info() TypeInfo

class RangeDownToGreaterThanIterator<<$DataType>> [compound]

augments RangeDownToGreaterThanIterator<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( cur:$DataType, limit:$DataType, step:$DataType ) RangeDownToGreaterThanIterator<<$DataType>>

Properties

Name Type Description
cur $DataType
limit $DataType
step $DataType

Methods

Signature Return Type Description
description() String
operator==( other:RangeDownToGreaterThanIterator<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
read_another() Optional<<$DataType>>
to<<$DataType[]>>() List<<$DataType>>
to<<Object>>() Boxed<<RangeDownToGreaterThanIterator<<$DataType>>>>
to<<String>>() String
to<<Variant>>() Variant
to_list() List<<$DataType>>
type_info() TypeInfo

class RangeDownToIterator<<$DataType>> [compound]

augments RangeDownToIterator<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( cur:$DataType, limit:$DataType, step:$DataType ) RangeDownToIterator<<$DataType>>

Properties

Name Type Description
cur $DataType
limit $DataType
step $DataType

Methods

Signature Return Type Description
description() String
operator==( other:RangeDownToIterator<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
read_another() Optional<<$DataType>>
to<<$DataType[]>>() List<<$DataType>>
to<<Object>>() Boxed<<RangeDownToIterator<<$DataType>>>>
to<<String>>() String
to<<Variant>>() Variant
to_list() List<<$DataType>>
type_info() TypeInfo

class RangeUpTo<<$DataType>> [compound]

augments RangeUpTo<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( start:$DataType, limit:$DataType, step:$DataType ) RangeUpTo<<$DataType>>

Properties

Name Type Description
limit $DataType
start $DataType
step $DataType

Methods

Signature Return Type Description
count() Int
description() String
iterator() RangeUpToIterator<<$DataType>>
operator==( other:RangeUpTo<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<$DataType[]>>() List<<$DataType>>
to<<Object>>() Boxed<<RangeUpTo<<$DataType>>>>
to<<Range<<$DataType>>>>() Range<<$DataType>>
to<<String>>() String
to<<Variant>>() Variant
to_list() List<<$DataType>>
type_info() TypeInfo

class RangeUpToIterator<<$DataType>> [compound]

augments RangeUpToIterator<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( cur:$DataType, limit:$DataType, step:$DataType ) RangeUpToIterator<<$DataType>>

Properties

Name Type Description
cur $DataType
limit $DataType
step $DataType

Methods

Signature Return Type Description
description() String
operator==( other:RangeUpToIterator<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
read_another() Optional<<$DataType>>
to<<$DataType[]>>() List<<$DataType>>
to<<Object>>() Boxed<<RangeUpToIterator<<$DataType>>>>
to<<String>>() String
to<<Variant>>() Variant
to_list() List<<$DataType>>
type_info() TypeInfo

class RangeUpToLessThan<<$DataType>> [compound]

augments RangeUpToLessThan<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( start:$DataType, limit:$DataType, step:$DataType ) RangeUpToLessThan<<$DataType>>

Properties

Name Type Description
limit $DataType
start $DataType
step $DataType

Methods

Signature Return Type Description
count() Int
description() String
iterator() RangeUpToLessThanIterator<<$DataType>>
operator==( other:RangeUpToLessThan<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
to<<$DataType[]>>() List<<$DataType>>
to<<Object>>() Boxed<<RangeUpToLessThan<<$DataType>>>>
to<<Range<<$DataType>>>>() Range<<$DataType>>
to<<String>>() String
to<<Variant>>() Variant
to_list() List<<$DataType>>
type_info() TypeInfo

class RangeUpToLessThanIterator<<$DataType>> [compound]

augments RangeUpToLessThanIterator<<$DataType>>

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( cur:$DataType, limit:$DataType, step:$DataType ) RangeUpToLessThanIterator<<$DataType>>

Properties

Name Type Description
cur $DataType
limit $DataType
step $DataType

Methods

Signature Return Type Description
description() String
operator==( other:RangeUpToLessThanIterator<<$DataType>> ) Logical
print_to( buffer:PrintWriter )
read_another() Optional<<$DataType>>
to<<$DataType[]>>() List<<$DataType>>
to<<Object>>() Boxed<<RangeUpToLessThanIterator<<$DataType>>>>
to<<String>>() String
to<<Variant>>() Variant
to_list() List<<$DataType>>
type_info() TypeInfo

Recyclable.rogue

class Recyclable [aspect]

Methods

Signature Return Type Description
on_recycle()

RecyclePool.rogue

class RecyclePool<<$DataType>> [singleton]

extends Object

Properties

Name Type Description
available List<<$DataType>>

Methods

Signature Return Type Description
acquire() $DataType
on_use() $DataType
on_end_use( object:$DataType ) override with desired object cleanup
recycle( object:$DataType )

Shared.rogue

class Shared<<$DataType>> [singleton]

extends Object

Properties

Name Type Description
lookup [GlobalID:$DataType]

Methods

Signature Return Type Description
get( id:GlobalID ) $DataType
set( id:GlobalID, value:$DataType )

Signals.rogue

class SignalConnection [compound]

incorporates CommonCompoundMethods

Description

Use the ?=> operator to create weakly referenced callbacks.

Global Methods

Signature Return Type Description
create( signal_id:SignalID, group:SignalID, callback_w_args:Function(Variant), callback_noargs:Function() ) SignalConnection
create( signal_id:SignalID, group:SignalID?, callback:Function() ) SignalConnection
create( signal_id:SignalID, group:SignalID?, callback:Function(Variant) ) SignalConnection
resolve_group( group:SignalID?, id:SignalID ) SignalID

Properties

Name Type Description
callback_noargs Function()
callback_w_args Function(Variant)
group SignalID
signal_id SignalID

Methods

Signature Return Type Description
call( args:Variant )
description() String
disconnect()
operator?() Logical
operator==( other:SignalConnection ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<SignalConnection>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class SignalID [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( global_id:GlobalID ) SignalID
create( value:Int ) SignalID

Properties

Name Type Description
value Int

Methods

Signature Return Type Description
description() String
hashcode() Int
on_signal( callback:Function(), &once ) SignalConnection
on_signal( callback:Function(), group:SignalID, &once ) SignalConnection
on_signal( callback:Function(Variant), &once ) SignalConnection
on_signal( callback:Function(Variant), group:SignalID, &once ) SignalConnection
operator?() Logical
operator==( other:SignalID ) Logical
print_to( buffer:PrintWriter )
signal( [args=undefined:Variant] )
to<<Object>>() Boxed<<SignalID>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class SignalIDLookup [singleton]

extends Object

Properties

Name Type Description
global_id_lookup [GlobalID:SignalID]
name_lookup [SignalID:String]
next_signal_id Int
string_key_lookup [String:SignalID]

Methods

Signature Return Type Description
get( global_id:GlobalID ) SignalID
get( string_key:String ) SignalID

class Signals [singleton]

extends Object

Properties

Name Type Description
one_time_connections [SignalID:SignalConnection[]]
standard_connections [SignalID:SignalConnection[]]

Methods

Signature Return Type Description
disconnect( connection:SignalConnection )
disconnect( signal_id:SignalID )
disconnect( signal_id:SignalID, group:SignalID )
disconnect_group( group:SignalID ) Disconnects all signal connections that have the given group.
dispatch( signal_id:SignalID, [args=undefined:Variant] )
on( connection:SignalConnection, &once ) SignalConnection
on( signal_id:SignalID, callback:Function(), [group=null:SignalID?], &once ) SignalConnection
on( signal_id:SignalID, callback:Function(Variant), [group=null:SignalID?], &once ) SignalConnection
remove_invalid_connections() Invalid connections are automatically removed during signal dispatch, but remove_invalid_connections can be manually called to examine every connection.

class Signals<<$EnumType>> [aspect]

Description

Incorporate into enum type, e.g. 'enum MyEnum : Signals<<MyEnum>> ...'. Use the ?=> operator to create weakly referenced callbacks.

Global Properties

Name Type Description
lookup SignalID[]

Global Methods

Signature Return Type Description
disconnect_signal_group()
signal_id_lookup() SignalID[]

Methods

Signature Return Type Description
disconnect_signals()
disconnect_signal( connection:SignalConnection )
disconnect_signals( group:SignalID )
on_signal( callback:Function(), &once ) SignalConnection
on_signal( callback:Function(), group:SignalID, &once ) SignalConnection
on_signal( callback:Function(Variant), &once ) SignalConnection
on_signal( callback:Function(Variant), group:SignalID, &once ) SignalConnection
signal( [args=undefined:Variant] )

Span.rogue

class Span [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( index:Int, count:Int ) Span

Properties

Name Type Description
count Int
index Int

Methods

Signature Return Type Description
description() String
i2() Int
limit() Int
operator==( other:Span ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<Span>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo
unleft( n:Int ) Span
unright( n:Int ) Span

StackTrace.rogue

class StackTrace

extends Object

Properties

Name Type Description
frames StackTraceFrame[]

Methods

Signature Return Type Description
init()
discard_exception_frames( exception_type_name:String )
display()
filename( index:Int ) String
line( index:Int ) Int
procedure( index:Int ) String
to<<String>>() String

class StackTraceFrame [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( procedure:String, filename:String, line:Int ) StackTraceFrame

Properties

Name Type Description
filename String
line Int
procedure String

Methods

Signature Return Type Description
description() String
operator==( other:StackTraceFrame ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<StackTraceFrame>>
to<<String>>() String
to<<Variant>>() Variant
to<<String>>( left_w:Int, right_w:Int ) String
type_info() TypeInfo

String.rogue

class String

extends Object

incorporates Recyclable, PrintWriter

Global Methods

Signature Return Type Description
create( data:Byte[], [encoding=StringEncoding.AUTODETECT:StringEncoding] ) String
create( data:Character[] ) String
create( file:File, [encoding=StringEncoding.AUTODETECT:StringEncoding] ) String
exists( string:String ) Logical Returns false if the string is null or empty; otherwise returns true.
operator*( left:Int, right:String ) String
operator*( left:String, right:Int ) String
operator+( left:String, right:Byte ) String
operator+( left:String, right:Character ) String
operator+( left:String, right:Int32 ) String
operator+( left:String, right:Int64 ) String
operator+( left:String, right:Logical ) String
operator+( left:String, right:Object ) String
operator+( left:String, right:Real32 ) String
operator+( left:String, right:Real64 ) String
operator+( left:String, right:String ) String
operator/( prefix:String, suffix:String ) String
operator<>( a:String, b:String ) Int
operator==( a:String, b:String ) Logical

Properties

Name Type Description
at_newline Logical
count Int in whole characters
cursor_index Int in characters
cursor_offset Int in bytes
data Byte[]
hashcode Int
indent Int
is_ascii Logical makes indexing easier if true
is_immutable Logical

Methods

Signature Return Type Description
init()
init( _data:Byte[], count:Int ) '_data' must be valid UTF-8.
init( byte_capacity:Int )
init( character:Character )
init( existing:String )
after( index:Int ) String Returns the substring of this string that occurs after the given index.

Equivalent to `from(index+1)`.
after( span:Span ) String
after_any( ch:Character, &ignore_case ) String
after_any( st:String, &ignore_case ) String
after_first( ch:Character, &ignore_case ) String
after_first( st:String, &ignore_case ) String
after_last( ch:Character, &ignore_case ) String
after_last( st:String, &ignore_case ) String
after_prefix( ch:Character, &ignore_case ) String
after_prefix( st:String, &ignore_case ) String
appending( other:String, [spacer=" ":String] ) String If this string is empty then 'other' is returned. Otherwise, 'this+spacer+other' is returned.
before( index:Int ) String Returns the substring of this string that occur before the given index.

Equivalent to ''leftmost(index)''.
before( span:Span ) String
before_first( ch:Character, &ignore_case ) String
before_first( st:String, &ignore_case ) String
before_last( ch:Character, &ignore_case ) String
before_last( st:String, &ignore_case ) String
before_suffix( ch:Character, &ignore_case ) String
before_suffix( st:String, &ignore_case ) String
begins_with( ch:Character, &ignore_case ) Logical
begins_with( other:String, &ignore_case ) Logical
byte_count() Int
byte( byte_index:Int ) Byte
capacity() Int
capitalized() String
centered( spaces:Int, [fill=' ':Character] ) String
clear()
clipped( &left=0, &right=0 ) String Removes the specified number of characters from the left and/or right sides of this string and returns the result.
cloned() String
close()
compare_to( other:String, &ignore_case ) Int
contains( ch:Character, &ignore_case ) Logical
contains( substring:String, &ignore_case ) Logical
contains_at( substring:String, at_index:Int, &ignore_case ) Logical
contains_pattern( pattern:String, &ignore_case ) Logical Returns true if this string contains the pattern "*<pattern>*" - in other words any number of characters can come before and after the matching pattern.

The pattern is matched literally apart from the following special sequences and behavior:
  * - Matches any number of characters.
  ? - Matches any single character.
  $ - Like '*' but discards leading whitespace; is used as a marker in extract_string(s).
  $(I) - Matches an integer character sequence.
  $(R) - Matches a real number character sequence.
  $(#) - Matches a single digit 0-9
  $($) - Matches a single literal '$'.
  ' ' - A space matches 1 or more spaces and tabs.

Finally, extra whitespace in this string that isn't matched in the pattern string is ignored as long as the whitespace doesn't have alphanumeric characters on both sides.

For example, "a += c".contains_pattern("a+=c") -> true For example, "a b c".contains_pattern("abc") -> false
count() Int
count( look_for:Character ) Int
count( look_for:String ) Int
decode_base64() Byte[]
discard_from( i1:Int )
ends_with( ch:Character, &ignore_case ) Logical
ends_with( other:String, &ignore_case ) Logical
equals( other:String, &ignore_case ) Logical
extract_indentation() String Returns a string consisting of this string's leading spaces and tabs.
extract_string( format:String, &ignore_case ) String Extracts the string corresponding to the first '$' marker in the given format pattern.

The format pattern is matched literally apart from the following special sequences and behavior:
  * - Matches any number of characters.
  ? - Matches any single character.
  $ - Like '*' but discards leading whitespace; is used as a marker in extract_string(s).
  $(I) - Matches an integer character sequence.
  $(R) - Matches a real number character sequence.
  $(#) - Matches a single digit 0-9
  $($) - Matches a single literal '$'.
  ' ' - A space matches 1 or more spaces and tabs.

Finally, extra whitespace in this string that isn't matched in the pattern string is ignored as long as the whitespace doesn't have alphanumeric characters on both sides.

EXAMPLE
  println "<tag name='abc'/>".extract_string( "*'$'*" )
  # prints: abc
extract_strings( format:String, &ignore_case ) String[] Extracts multiple strings, each corresponding to a '$' marker in the format pattern. See extract_string() for additional details.

EXAMPLE
  println "position = (x,4)".extract_strings( "*($,$)" )
  # prints: [x,4]
extract_strings( format:String, results:String[], &ignore_case ) String[]
first() Character
flush()
from( i1:Int ) String
from( i1:Int, i2:Int ) String
from_first( ch:Character, &ignore_case ) String
from_first( st:String, &ignore_case ) String
from_last( ch:Character, &ignore_case ) String
from_last( st:String, &ignore_case ) String
get( index:Int ) Character
hashcode() Int
immutable_clone() String
indent() Int
indented( spaces:Int ) String
insert( ch:Character )
is_integer() Logical
is_number() Logical
is_real() Logical
is_valid_email() Logical
iterator() StringIterator
justified( spaces:Int, [fill=' ':Character] ) String
last() Character
leftmost( n:Int ) String
leftmost_common_substring_count( other:String, [max_count=null:Int?] ) Int
locate( ch:Character, [optional_i1=null:Int?], &ignore_case ) Int?
locate( other:String, [optional_i1=null:Int?], &ignore_case ) Int?
locate_last( ch:Character, [starting_index=null:Int?], &ignore_case ) Int?
locate_last( other:String, [starting_index=null:Int?], &ignore_case ) Int?
locate_nth( ch:Character, n:Int, [optional_i1=null:Int?], &ignore_case ) Int? n=1 finds the first match from the left side (or optional first index), etc.
locate_nth( other:String, n:Int, [optional_i1=null:Int?], &ignore_case ) Int? n=1 finds the first match from the left side (or optional first index), etc.
locate_nth_last( ch:Character, n:Int, [optional_i1=null:Int?], &ignore_case ) Int? n=1 finds the first match from the right side (or optional first index), etc.
locate_nth_last( other:String, n:Int, [optional_i1=null:Int?], &ignore_case ) Int? n=1 finds the first match from the right side (or optional first index), etc.
locate_pattern( pattern:String, [i1=0:Int], &ignore_case ) Span? EXAMPLE
  "ab cd ef gh ij".locate_pattern("cd $ gh") -> Span(3,8)
matches_pattern( pattern:String, &ignore_case ) Logical Returns true if this string matches the given pattern.

The pattern is matched literally apart from the following special sequences and behavior:
  * - Matches any number of characters.
  ? - Matches any single character.
  $ - Like '*' but discards leading whitespace; is used as a marker in extract_string(s).
  $(I) - Matches an integer character sequence.
  $(R) - Matches a real number character sequence.
  $(#) - Matches a single digit 0-9
  $($) - Matches a single literal '$'.
  ' ' - A space matches 1 or more spaces and tabs.

Finally, extra whitespace in this string that isn't matched in the pattern string is ignored as long as the whitespace doesn't have alphanumeric characters on both sides.

For example, "a += c".matches_pattern("a+=c") -> true For example, "a b c".matches_pattern("abc") -> false
on_recycle()
pluralized( quantity:Int ) String Returns a pluralized form of this string.

This string may be of the form "singlar" or "singlar/plural", where both singular and plural parts may contain a "#" to indicate where the given ''quantity'' should be inserted.

If the string only contains the "singular" part, first a substring of the form "(s)" or "(es)" (etc.) is looked for. If that exists, it is included in the result if the string is plural and omitted if the string is singular.

If there is no "(s)" (etc.) then either "s" or "es" is inserted after the last letter - "es" is used only when the last letter is an "s" already.

Examples:

  "cat".pluralized(1) # returns: cat
  "cat".pluralized(2) # returns: cats
  "My # glass.".pluralized(1) # returns: My 1 glass.
  "My # glass.".pluralized(2) # returns: My 2 glasses.
  "a thief./# thieves".pluralized(1) # returns: a thief.
  "a thief./# thieves".pluralized(40) # returns: 40 thieves.
  "# match(es) found".pluralized(1) # returns: 1 match found
  "# match(es) found".pluralized(0) # returns: 0 matches found
print( value:Byte )
print( value:Character )
print( value:Int32 )
print( value:Int64 )
print( value:Logical )
print( value:Object )
print( value:Real64 )
print( value:Real64, decimal_places:Int32 )
print( value:RogueConstCharPointer )
print( value:String )
println()
println( value:Byte )
println( value:Character )
println( value:Int32 )
println( value:Int64 )
println( value:Logical )
println( value:Object )
println( value:Real64 )
println( value:Real64, decimal_places:Int32 )
println( value:String )
reader() StringReader
remove_first() Character
remove_last() Character
replacing( look_for:Character, replace_with:Character, &ignore_case ) String
replacing( look_for:Character, replace_with:String, &ignore_case ) String Returns a modified string where all instances of ''look_for'' are replaced with ''replace_with''.
replacing( look_for:String, replace_with:String, &ignore_case ) String Returns a modified string where all instances of ''look_for'' are replaced with ''replace_with''.
replacing_at( index:Int, n:Int, replace_with:String ) String
replacing_pattern( search_pattern:String, replacement_pattern:String, [parens="()":String] ) String Search pattern has same "$*?" wildcard format as .extract_strings():
  - '$' acts as '*' but also denotes a piece to be extracted.
Replacement pattern contains '$' to denote implicitly-paired points of substitution '$(0)' etc. to indicate the 0th, etc. extracted value. '$()' can be used to escape the special meaning of a successive '(0)' and '$($)' can be written to indicate a literal '$'.

If this string contains line breaks then the search is performed on separate lines in order to avoid excessive search times by wildcards.

Examples:
  "Alice and Bob".replacing_pattern( "$ and $", "$ & $" ) -> "Alice & Bob"
  "Alice and Bob".replacing_pattern( "$ and $", "$(1) and $(0)" ) -> "Bob and Alice"
reserve( additional_bytes:Int )
reverse() Reverses the characters in this mutable String.
reversed() String
rightmost( n:Int ) String
rightmost_common_substring_count( other:String ) Int
rot13( [buffer=String():String] ) String Lightweight obfuscation. Rotates letters by 13 characters and numerical digits by 5. Apply it once to obfuscate a string; apply it a second time to return to the original.
rot47( [buffer=String():String] ) String Lightweight obfuscation. Rotates ASCII characters 32..125 (excludes '~') by 47 characters. Apply it once to obfuscate a string; apply it a second time to return to the original.
set_cursor( character_index:Int ) Int Sets this string's cursor_offset (in bytes) and cursor_index (in characters)
set_indent( indent:Int )
split() String[] Splits the string on whitespace
split( group_size:Int ) String[] Splits this string into groups of size 'group_size'. Specify a negative to begin grouping on the left or positive to begin grouping on the right.

Examples:
  "ABCDEFGH".split(-3) -> ["ABC","DEF","GH"]
  "ABCDEFGH".split(3) -> ["AB","CDE","FGH"]
  println 2000->String(&binary).split(4).join(' ')
    # 0000 0000 0000 0000 0000 0111 1101 0000
split( separator:Character, &ignore_case ) String[]
split( separator:String, &ignore_case ) String[]
split_identifiers( [result=null:String[]] ) String[]
substring( i1:Int ) String
substring( i1:Int, n:Int ) String
substring( span:Span ) String
tidied() String Trims whitespace on either end and replaces interior runs of one or more spaces and/or tabs with single spaces.
to<<Byte[]>>() Byte[]
to<<Character[]>>() Character[]
to<<Object>>() Object
to<<String>>() String
to<<Variant>>() Variant
to_camel_case() String Returns this string converted into "camelCase". Useful for converting programming identifiers from other formats into camelCase format.
to_definition_case() String Returns this string converted into "DEFINITION_CASE". Useful for converting programming identifiers from other formats into DEFINITION_CASE format.
to_lowercase() String
to_pascal_case() String Returns this string converted into "PascalCase". Useful for converting programming identifiers from other formats into PascalCase format.
to_plain_ascii() String Converts or strips any non-ASCII Unicode. - Converts letters with diacritical marks to plain ASCII letters (ä -> a). - Converts some other letter-like symbols into letters. - Strips out any other characters with Unicode values greater than 127.
to_serpent_case() String Returns this string converted into "serpent_case". Useful for converting programming identifiers from other formats into serpent_case format.
to_title_case() String Returns this string converted into "Title Case". Useful for converting programming identifiers from other formats into Title Case format.
to_uppercase() String
to_utf8() Byte[]
to<<Int32>>( [base=10:Int], [from=0:Int] ) Int32
to<<Int64>>( [base=10:Int], [from=0:Int] ) Int64
to<<Int>>( [base=10:Int], [from=0:Int] ) Int
to<<Real32>>( [from=0:Int] ) Real32
to<<Real64>>( [from=0:Int] ) Real64
to<<Real>>( [from=0:Int] ) Real
to_escaped_ascii( [additional_characters_to_escape="":String] ) String
to_escaped_unicode( [additional_characters_to_escape="":String] ) String
trim( n:Int ) String Trims 'n' characters from both ends.
trimmed() String Trim white spaces on both ends
unescaped( [result=null:String] ) String Replaces Rogue escape sequences with the characters they represent.

\ch -> ch \b -> BACKSPACE (Character 8) \e -> ESCAPE (Character 27) \f -> FORM FEED (Character 12) \n -> NEWLINE (Character 10) \r -> RETURN (Character 13) \t -> TAB (Character 9) \v -> V-TAB (Character 11) \0 -> NULL (Character 0) \xHH -> Character(0xHH) \uHHHH -> Character(0xHHHH) \[HHHHHH] -> Character(0xHHHHHH) (H can be 1-6 hex digits)
unleft( n:Int ) String "abc".unleft(1) -> bc
unright( n:Int ) String "abc".unright(1) -> ab
up_to_first( ch:Character, &ignore_case ) String
up_to_first( st:String, &ignore_case ) String
up_to_last( ch:Character, &ignore_case ) String
up_to_last( st:String, &ignore_case ) String
with_prefix( ch:Character ) String Returns a string that begins with the given character. If this string already begins with the given character then this string is returned unchanged.
with_prefix( text:String ) String Returns a string that begins with the given text. If this string already begins with the given text then this string is returned unchanged.
with_suffix( ch:Character ) String Returns a string that ends with the given character. If this string already ends with the given character then this string is returned unchanged.
with_suffix( text:String ) String Returns a string that ends with the given text. If this string already ends with the given text then this string is returned unchanged.
without_suffix( ch:Character ) String Like before_suffix() but removes multiple copies of the given character.
without_suffix( text:String ) String Like before_suffix() but removes multiple copies of the given string.
word_wrap( width:Int, [allow_break_after=null:String] ) String[] Returns a word-wrapped version of this string as a list of lines. Existing newlines characters will cause a new line to begin immediately. Spaces immediately following existing newline characters are preserved.
word_wrapped( width:Int, [allow_break_after=null:String], [buffer=String():String] ) String Prints a word-wrapped version of this string to the given String. Existing newlines characters will cause a new line to begin immediately. Spaces immediately following existing newline characters are preserved.

class StringIterator [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( string:String ) StringIterator
create( string:String, position:Int, count:Int ) StringIterator

Properties

Name Type Description
count Int
position Int
string String

Methods

Signature Return Type Description
description() String
has_another() Logical
has_another( n:Int ) Logical
operator==( other:StringIterator ) Logical
peek() Character
print_to( buffer:PrintWriter )
read() Character
read_another() Character?
to<<Object>>() Boxed<<StringIterator>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class StringReader

extends Object

incorporates Reader<<$DataType>>

Properties

Name Type Description
count Int
position Int
string String

Methods

Signature Return Type Description
init( string:String )
close()
has_another() Logical
has_another( n:Int ) Logical
on_end_use()
on_use() StringReader
peek() Character
position() Int
read() Character
read( buffer:Character[], limit:Int ) Int
reset()
seek( pos:Int )
skip( n:Int )
to<<Character[]>>() Character[]
to<<String>>() String

StringEncoding.rogue

enum StringEncoding

incorporates CommonCompoundMethods

Categories

Category Value Description
UTF8 0
ASCII 1
ASCII_256 2
AUTODETECT 3

Global Properties

Name Type Description
categories StringEncoding[]

Global Methods

Signature Return Type Description
create( name:String ) StringEncoding
create( value:Int ) StringEncoding

Properties

Name Type Description
value Int

Methods

Signature Return Type Description
description() String
hashcode() Int
name() String
operator?() Logical
operator==( other:StringEncoding ) Logical
print_to( buffer:PrintWriter )
to<<Int>>() Int
to<<Object>>() Object
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

StringPool.rogue

class StringPool [singleton]

extends RecyclePool<<String>>

Properties

Name Type Description
available String[]

TypeID.rogue

class TypeID [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( index:Int ) TypeID

Properties

Name Type Description
index Int

Methods

Signature Return Type Description
attributes() Int
base_class() TypeInfo
base_type_count() Int
base_type( i:Int ) TypeInfo
class_data_index() Int32
create_object() Object
create_object<<$AsType>>() $AsType
description() String
find_global_method( name_or_sig:String, [arg_count=null:Int32?] ) MethodInfo
find_global_property( name:String ) PropertyInfo?
find_method( method_list:MethodInfo[], name_or_sig:String, [arg_count=null:Int32?] ) MethodInfo
find_method( name_or_sig:String, [arg_count=null:Int32?] ) MethodInfo
find_property( name:String ) PropertyInfo?
find_property( property_list:PropertyInfo[], name:String ) PropertyInfo?
global_methods() MethodInfo[]
global_properties() PropertyInfo[]
instance_of( ancestor:TypeID ) Logical
instance_of( ancestor:TypeInfo ) Logical
is_aspect() Logical
is_compound() Logical
is_enum() Logical
is_object() Logical
is_primitive() Logical
is_singleton() Logical
library_context_name() String
methods() MethodInfo[]
name() String
operator==( other:TypeID ) Logical
print_to( buffer:PrintWriter )
properties() PropertyInfo[]
set_singleton( new_value:Variant )
singleton() Variant
to<<Object>>() Boxed<<TypeID>>
to<<String>>() String
to<<TypeInfo>>() TypeInfo
to<<Variant>>() Variant
type_info() TypeInfo

Variant.rogue

class UsableValidatedVariantTableKey [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( value:Variant, [force_string_keys=false:Logical] ) UsableValidatedVariantTableKey
create( value:Variant, string:String ) UsableValidatedVariantTableKey

Properties

Name Type Description
string String
value Variant

Methods

Signature Return Type Description
description() String
on_use() Variant
on_end_use( key:Variant )
operator==( other:UsableValidatedVariantTableKey ) Logical
print_to( buffer:PrintWriter )
to<<Object>>() Boxed<<UsableValidatedVariantTableKey>>
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo

class Variant [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create() Variant
create_list() Variant Convenience syntax: @[] is equivalent to Variant.create_list()
create_table() Variant Convenience syntax: @{} is equivalent to Variant.create_table()
create( value:[Variant:Variant] ) Variant
create( value:Anchor ) Variant
create( value:Box ) Variant
create( value:Byte ) Variant
create( value:Character ) Variant
create( value:Circle ) Variant
create( value:Color ) Variant
create( value:Degrees ) Variant
create( value:File ) Variant
create( value:GlobalID ) Variant
create( value:Int ) Variant
create( value:Int32 ) Variant
create( value:Int64 ) Variant
create( value:Line ) Variant
create( value:Logical ) Variant
create( value:Object ) Variant
create( value:Quad ) Variant
create( value:Quad32 ) Variant
create( value:Radians ) Variant
create( value:Real ) Variant
create( value:Real32 ) Variant
create( value:Real64 ) Variant
create( value:String ) Variant
create( value:Triangle ) Variant
create( value:Variant[] ) Variant
create( value:XorInt ) Variant
create( value:XY ) Variant
create( value:XYZ ) Variant
create( value:XYZW ) Variant

Properties

Name Type Description
@native2 RogueCNativeProperty
box Box
byte Byte
character Character
circle Circle
color Color
degrees Degrees
global_id GlobalID
int32 Int32
int64 Int64
integer Int
line Line
logical Logical
object Object Can't be mixed into the primitives union due to GC constraints
quad32 Quad32
radians Radians
real Real
real32 Real32
real64 Real64
triangle Triangle
type Int
xorint XorInt
xy XY
xyz XYZ
xyzw XYZW

Methods

Signature Return Type Description
add( value:Variant )
add_all( value:Variant )
as_list() Variant[] If this value .is_list, returns the backing Variant[] list; otherwise returns null.
as_string() String If this value .is_string, returns the backing String; otherwise returns null.

  Variant | ->String | .as_string
  ------------|-----------|------------
  null | "null" | null
  undefined | "" | null
  "ABC" | "ABC" | ABC
  [3,4] | "[3,4]" | null
  {x:22} | "{x:22}" | null
as_table() [Variant:Variant] If this value .is_table, returns the backing [Variant:Variant] table; otherwise returns null.
at( index:Int ) Variant
clear()
cloned() Variant
compressed() Variant
contains( value:Variant ) Logical
count() Int
decode_indexed( id_table:ValueIDLookupTable ) Variant
decompressed() Variant
description() String
disconnect_on_change( key:String )
disconnect_on_change( path:GlobalID )
encode_indexed( id_table_builder:ValueIDTableBuilder ) Variant
ensure_list( name:String ) Variant
ensure_table( name:String ) Variant
entries() TableEntriesIterator<<Variant,Variant>>
entry( key:String ) VariantEntry
entry( path:GlobalID ) VariantEntry
exists() Logical
first() Variant
first( query:Function(Variant)->Logical ) Variant
get( index:Int ) Variant
get( key:Character ) Variant Make sure that Characters get mapped to Strings, not Ints
get( key:String ) Variant
get( key:Variant ) Variant
hashcode() Int
insert( value:Variant, [before_index=0:Int] )
is_anchor() Logical
is_box() Logical
is_byte() Logical
is_character() Logical
is_circle() Logical
is_collection() Logical
is_color() Logical
is_degrees() Logical
is_empty() Logical
is_file() Logical
is_geometry() Logical
is_global_id() Logical
is_int() Logical
is_int32() Logical
is_int64() Logical
is_integer() Logical
is_line() Logical
is_list() Logical
is_logical() Logical
is_null() Logical
is_number() Logical
is_object() Logical
is_quad() Logical
is_radians() Logical
is_real() Logical
is_real32() Logical
is_real64() Logical
is_string() Logical
is_table() Logical
is_triangle() Logical
is_undefined() Logical
is_xorint() Logical
is_xy() Logical
is_xyz() Logical
is_xyzw() Logical
keys() TableKeysIterator<<Variant,Variant>>
last() Variant
last( query:Function(Variant)->Logical ) Variant
locate( value:Variant, [i1=null:Int?] ) Int?
locate_last( value:Variant, [i1=null:Int?] ) Int?
map_list<<$NewListElementType>>( [fn=null:Function(Variant)->$NewListElementType] ) $NewListElementType[]
map_table<<$NewTableType>>( [fn=null:Function(Variant,Variant,$NewTableType)] ) $NewTableType
on_change( key:String, global_id:GlobalID )
on_change( key:String, signal:SignalID )
on_change( path:GlobalID, global_id:GlobalID )
on_change( path:GlobalID, signal:SignalID )
operator!() Variant
operator-() Variant
operator?() Logical
operator%( other:Variant ) Variant
operator&( other:Variant ) Variant
operator*( other:Variant ) Variant
operator+( other:Variant ) Variant
operator-( other:Variant ) Variant
operator/( other:Variant ) Variant
operator:<<:( other:Variant ) Variant
operator:>>:( other:Variant ) Variant
operator:>>>:( other:Variant ) Variant
operator<>( other:Variant ) Int
operator==( other:Variant ) Int
operator^( other:Variant ) Variant
operator|( other:Variant ) Variant
operator~( other:Variant ) Variant
or_default( default_value:Variant ) Variant
print_to( buffer:PrintWriter )
remove_first() Variant
remove_last() Variant
remove( value:Variant ) Variant
remove_at( index:Int ) Variant
reserve( additional_elements:Int )
resize( n:Int, [default_value=0:Variant] ) Resizes this list to contain 'n' elements. Any new elements are set to 'default_value.cloned'.
set( index:Int, value:Variant )
set( key:Character, value:Variant ) Make sure that Characters get mapped to Strings, not Ints
set( key:String, value:Variant )
set( key:Variant, value:Variant )
sort( compare_fn:Function(Variant,Variant)->Logical ) 'compare_fn' should return true if the first parameter should be positioned before the second parameter. The values passed will be keys for a Variant Table or elements for a Variant List.
to<<$Type>>() $Type
to<<Anchor>>() Anchor
to<<Box>>() Box
to<<Byte>>() Byte
to<<Character>>() Character
to<<Circle>>() Circle
to<<Color>>() Color
to<<Degrees>>() Degrees
to<<File>>() File
to<<GlobalID>>() GlobalID
to<<Int32>>() Int32
to<<Int64>>() Int64
to<<Int>>() Int
to<<Line>>() Line
to<<Logical>>() Logical
to<<Object>>() Object
to<<Quad32>>() Quad32
to<<Quad>>() Quad
to<<Radians>>() Radians
to<<Real32>>() Real32
to<<Real64>>() Real64
to<<Real>>() Real
to<<String>>() String
to<<Triangle>>() Triangle
to<<Variant>>() Variant
to<<XorInt>>() XorInt
to<<XY>>() XY
to<<XYZ>>() XYZ
to<<XYZW>>() XYZW
to_list<<$DataType>>() List<<$DataType>>
to_optional<<$Type>>() $Type?
to<<JSON>>( &formatted, &omit_commas ) JSON
to_compatible_values( other:Variant ) (Variant,Variant)
to_json( &formatted, &omit_commas ) JSON
type_info() TypeInfo
values() TableValuesIterator<<Variant,Variant>>
write_json( builder:JSON, &formatted, &omit_commas, &ending_newline=true )
write_json_character( ch:Character, builder:JSON )
write_json_string( st:String, builder:JSON )
xorint_encoded() Variant Returns a duplicate of this Variant graph with any Int values converted into XorInt instead (which hides those values from runtime memory scanners). The resulting XorInts can be used just like Ints.

VariantEntry.rogue

class VariantEntry [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( variant:Variant, key:String ) VariantEntry
create( variant:Variant, path:GlobalID ) VariantEntry
create( variant:Variant, path:String, key:String ) VariantEntry

Properties

Name Type Description
key String
path String
variant Variant

Methods

Signature Return Type Description
context() Variant
description() String
exists() Logical
hashcode() Int
id() VariantEntryID
operator?() Logical
operator==( other:VariantEntry ) Logical
print_to( buffer:PrintWriter )
set( value:Variant )
to<<Box>>() Box
to<<Character>>() Character
to<<Int>>() Int
to<<Logical>>() Logical
to<<Object>>() Boxed<<VariantEntry>>
to<<Real>>() Real
to<<String>>() String
to<<Variant>>() Variant
to<<VariantEntryID>>() VariantEntryID
to<<XY>>() XY
type_info() TypeInfo

class VariantEntryID [compound]

incorporates CommonCompoundMethods

Global Methods

Signature Return Type Description
create( value:Int ) VariantEntryID

Properties

Name Type Description
value Int

Methods

Signature Return Type Description
description() String
entry() VariantEntry
exists() Logical
operator?() Logical
operator==( other:VariantEntryID ) Logical
print_to( buffer:PrintWriter )
to<<Box>>() Box
to<<Character>>() Character
to<<Int>>() Int
to<<Logical>>() Logical
to<<Object>>() Boxed<<VariantEntryID>>
to<<Real>>() Real
to<<String>>() String
to<<Variant>>() Variant
to<<VariantEntry>>() VariantEntry
to<<XY>>() XY
type_info() TypeInfo

class VariantEntryIDManager [singleton]

extends IndexedSet<<VariantEntry>>

Properties

Name Type Description
data [VariantEntry:Int]
lookup VariantEntry[]

WeakReference.rogue

class WeakReference

extends Object

Global Methods

Signature Return Type Description
operator?( ref:WeakReference ) Logical

Properties

Name Type Description
@native49 RogueCNativeProperty
next_weak_reference WeakReference

Methods

Signature Return Type Description
init( _object:Object )
object() Object
on_cleanup()
set_object( new_object:Object ) WeakReference

class WeakReference<<$DataType>>

extends WeakReference

Properties

Name Type Description
@native49 RogueCNativeProperty
next_weak_reference WeakReference

Methods

Signature Return Type Description
object() $DataType
operator==( other_object:Object ) Logical

WorkList.rogue

class WorkList<<$DataType,$Category>> [singleton]

extends Object

Description

Multiple worklists can be used concurrently as long as they specify a different $Category as a template parameter. Example:

  uses WorkList

  use numbers = WorkList<<Int32>>
    numbers.add( forEach in 1..10 )

    use evens = WorkList<<Int32,Filtered>>
      forEach (n in numbers)
        if (n % 2 == 0) evens.add( n )
      endForEach
      @trace evens
    endUse

  endUse

A WorkList without an explicit category uses category 'Default'.

Properties

Name Type Description
frame List<<$DataType>> current "frame"
sp_stack Int32[]
stack List<<$DataType>> stack of previous content "frames"

Methods

Signature Return Type Description
on_use() List<<$DataType>>
on_end_use( list:List<<$DataType>> )

class WorkList<<$DataType>> [singleton]

extends WorkList<<$DataType,Default>>

Description

WorkList<<T>> provides an efficient alternative to allocating local lists of type T in frequent and/or recursive calls.

Internally WorkList uses only two lists: a current work list or "frame" and a "stack" list that saves content across recursive calls. The lists grow as new "high-level watermark" capacity is required but they are never freed.

Each time a WorkList<<T>> is 'use'd it saves any old work list contents, clears the list, and returns it as a new work list. On 'endUse' the current work list is cleared again and refilled with its previous contents.

EXAMPLE
  method recurse_in_random_directions
    use dirs = WorkList<<Direction>>
      dirs.add( Direction.UP, Direction.LEFT, Direction.DOWN, Direction.RIGHT )
      dirs.shuffle
      forEach (dir in dirs) ...
    endUse

Properties

Name Type Description
frame List<<$DataType>> current "frame"
sp_stack Int32[]
stack List<<$DataType>> stack of previous content "frames"

XorInt.rogue

class XorInt [compound]

incorporates CommonCompoundMethods

Description

XorInt stores an Int 'value' in two Int parts: 'x', arbitrarily taken from the system time, and 'a', which contains the encoding (value ~ x).

Methods such as value(), to->Int, and to->String return the original value, which is obtained with (a ~ x).

The purpose of XorInt is to store important game stats in such a way that memory scanners cannot find and modify e.g. gold and score.

Global Methods

Signature Return Type Description
create() XorInt
create( a:Int, x:Int ) XorInt
create( value:Int ) XorInt

Properties

Name Type Description
a Int
x Int

Methods

Signature Return Type Description
description() String
hashcode() Int
operator-() XorInt
operator%( rhs:Int ) XorInt
operator%( rhs:XorInt ) XorInt
operator&( rhs:Int ) XorInt
operator&( rhs:XorInt ) XorInt
operator*( rhs:Int ) XorInt
operator*( rhs:XorInt ) XorInt
operator+( rhs:Int ) XorInt
operator+( rhs:XorInt ) XorInt
operator-( rhs:Int ) XorInt
operator-( rhs:XorInt ) XorInt
operator/( rhs:Int ) XorInt
operator/( rhs:XorInt ) XorInt
operator:<<:( rhs:Int ) XorInt
operator:<<:( rhs:XorInt ) XorInt
operator:>>:( rhs:Int ) XorInt
operator:>>:( rhs:XorInt ) XorInt
operator:>>>:( rhs:Int ) XorInt
operator:>>>:( rhs:XorInt ) XorInt
operator==( other:XorInt ) Logical
operator^( rhs:Int ) XorInt
operator^( rhs:XorInt ) XorInt
operator|( rhs:Int ) XorInt
operator|( rhs:XorInt ) XorInt
operator~( rhs:Int ) XorInt
operator~( rhs:XorInt ) XorInt
print_to( buffer:PrintWriter )
to<<Int>>() Int
to<<Logical>>() Logical
to<<Object>>() Boxed<<XorInt>>
to<<Real>>() Real
to<<String>>() String
to<<Variant>>() Variant
type_info() TypeInfo
value() Int
⚠️ **GitHub.com Fallback** ⚠️