Browse files

Added some sdk docs.

  • Loading branch information...
1 parent b845645 commit 4ae8d94c402fd50daf269079a8c0ff44a2f6c1a1 @fredreichbier fredreichbier committed Jul 21, 2010
Showing with 8,291 additions and 0 deletions.
  1. +190 −0 source/sdk/io/File.rst
  2. +56 −0 source/sdk/io/FileReader.rst
  3. +36 −0 source/sdk/io/FileWriter.rst
  4. +32 −0 source/sdk/io/Reader.rst
  5. +29 −0 source/sdk/io/Writer.rst
  6. +114 −0 source/sdk/io/native/FileUnix.rst
  7. +117 −0 source/sdk/io/native/FileWin32.rst
  8. +25 −0 source/sdk/io/native/dirent.rst
  9. +53 −0 source/sdk/lang/math.rst
  10. +31 −0 source/sdk/lang/memory.rst
  11. +84 −0 source/sdk/lang/stdio.rst
  12. +11 −0 source/sdk/lang/string.rst
  13. +7 −0 source/sdk/lang/system.rst
  14. +620 −0 source/sdk/lang/types.rst
  15. +14 −0 source/sdk/lang/vararg.rst
  16. +40 −0 source/sdk/math/Random.rst
  17. +7 −0 source/sdk/native/win32/errors.rst
  18. +25 −0 source/sdk/native/win32/types.rst
  19. +312 −0 source/sdk/net/Address.rst
  20. +62 −0 source/sdk/net/DNS.rst
  21. +12 −0 source/sdk/net/DatagramSocket.rst
  22. +37 −0 source/sdk/net/Exceptions.rst
  23. +35 −0 source/sdk/net/ServerSocket.rst
  24. +36 −0 source/sdk/net/Socket.rst
  25. +86 −0 source/sdk/net/StreamSocket.rst
  26. +125 −0 source/sdk/net/berkeley.rst
  27. +28 −0 source/sdk/os/Env.rst
  28. +34 −0 source/sdk/os/FileDescriptor.rst
  29. +28 −0 source/sdk/os/Pipe.rst
  30. +26 −0 source/sdk/os/PipeReader.rst
  31. +73 −0 source/sdk/os/Process.rst
  32. +78 −0 source/sdk/os/Terminal.rst
  33. +63 −0 source/sdk/os/Time.rst
  34. +16 −0 source/sdk/os/fcntl.rst
  35. +77 −0 source/sdk/os/mmap.rst
  36. +34 −0 source/sdk/os/native/PipeUnix.rst
  37. +20 −0 source/sdk/os/native/ProcessUnix.rst
  38. +46 −0 source/sdk/os/native/ProcessWin32.rst
  39. +27 −0 source/sdk/os/unistd.rst
  40. +13 −0 source/sdk/os/wait.rst
  41. +5 −0 source/sdk/out/get-sdk.rst
  42. +190 −0 source/sdk/out/io/File.rst
  43. +56 −0 source/sdk/out/io/FileReader.rst
  44. +36 −0 source/sdk/out/io/FileWriter.rst
  45. +32 −0 source/sdk/out/io/Reader.rst
  46. +29 −0 source/sdk/out/io/Writer.rst
  47. +114 −0 source/sdk/out/io/native/FileUnix.rst
  48. +117 −0 source/sdk/out/io/native/FileWin32.rst
  49. +25 −0 source/sdk/out/io/native/dirent.rst
  50. +53 −0 source/sdk/out/lang/math.rst
  51. +31 −0 source/sdk/out/lang/memory.rst
  52. +84 −0 source/sdk/out/lang/stdio.rst
  53. +11 −0 source/sdk/out/lang/string.rst
  54. +7 −0 source/sdk/out/lang/system.rst
  55. +634 −0 source/sdk/out/lang/types.rst
  56. +14 −0 source/sdk/out/lang/vararg.rst
  57. +40 −0 source/sdk/out/math/Random.rst
  58. +7 −0 source/sdk/out/native/win32/errors.rst
  59. +25 −0 source/sdk/out/native/win32/types.rst
  60. +312 −0 source/sdk/out/net/Address.rst
  61. +62 −0 source/sdk/out/net/DNS.rst
  62. +12 −0 source/sdk/out/net/DatagramSocket.rst
  63. +37 −0 source/sdk/out/net/Exceptions.rst
  64. +35 −0 source/sdk/out/net/ServerSocket.rst
  65. +36 −0 source/sdk/out/net/Socket.rst
  66. +86 −0 source/sdk/out/net/StreamSocket.rst
  67. +125 −0 source/sdk/out/net/berkeley.rst
  68. +28 −0 source/sdk/out/os/Env.rst
  69. +34 −0 source/sdk/out/os/FileDescriptor.rst
  70. +28 −0 source/sdk/out/os/Pipe.rst
  71. +26 −0 source/sdk/out/os/PipeReader.rst
  72. +73 −0 source/sdk/out/os/Process.rst
  73. +78 −0 source/sdk/out/os/Terminal.rst
  74. +63 −0 source/sdk/out/os/Time.rst
  75. +16 −0 source/sdk/out/os/fcntl.rst
  76. +77 −0 source/sdk/out/os/mmap.rst
  77. +34 −0 source/sdk/out/os/native/PipeUnix.rst
  78. +20 −0 source/sdk/out/os/native/ProcessUnix.rst
  79. +46 −0 source/sdk/out/os/native/ProcessWin32.rst
  80. +27 −0 source/sdk/out/os/unistd.rst
  81. +13 −0 source/sdk/out/os/wait.rst
  82. +103 −0 source/sdk/out/structs/ArrayList.rst
  83. +38 −0 source/sdk/out/structs/Bag.rst
  84. +34 −0 source/sdk/out/structs/HashBag.rst
  85. +151 −0 source/sdk/out/structs/HashMap.rst
  86. +90 −0 source/sdk/out/structs/LinkedList.rst
  87. +142 −0 source/sdk/out/structs/List.rst
  88. +57 −0 source/sdk/out/structs/MultiMap.rst
  89. +22 −0 source/sdk/out/structs/OrderedMultiMap.rst
  90. +32 −0 source/sdk/out/structs/Stack.rst
  91. +88 −0 source/sdk/out/text/Buffer.rst
  92. +41 −0 source/sdk/out/text/EscapeSequence.rst
  93. +114 −0 source/sdk/out/text/Regexp.rst
  94. +40 −0 source/sdk/out/text/Shlex.rst
  95. +12 −0 source/sdk/out/text/StringReader.rst
  96. +22 −0 source/sdk/out/text/StringTemplate.rst
  97. +83 −0 source/sdk/out/text/StringTokenizer.rst
  98. +39 −0 source/sdk/out/text/regexp/PCRE.rst
  99. +20 −0 source/sdk/out/text/regexp/POSIX.rst
  100. +44 −0 source/sdk/out/text/regexp/Regexp.rst
  101. +26 −0 source/sdk/out/text/regexp/RegexpBackend.rst
  102. +37 −0 source/sdk/out/threading/Mutex.rst
  103. +10 −0 source/sdk/out/threading/Runnable.rst
  104. +16 −0 source/sdk/out/threading/Thread.rst
  105. +50 −0 source/sdk/out/threading/native/MutexUnix.rst
  106. +5 −0 source/sdk/out/threading/native/MutexWin32.rst
  107. +25 −0 source/sdk/out/threading/native/ThreadUnix.rst
  108. +33 −0 source/sdk/out/threading/native/ThreadWin32.rst
  109. +103 −0 source/sdk/structs/ArrayList.rst
  110. +38 −0 source/sdk/structs/Bag.rst
  111. +34 −0 source/sdk/structs/HashBag.rst
  112. +151 −0 source/sdk/structs/HashMap.rst
  113. +90 −0 source/sdk/structs/LinkedList.rst
  114. +142 −0 source/sdk/structs/List.rst
  115. +57 −0 source/sdk/structs/MultiMap.rst
  116. +26 −0 source/sdk/structs/OrderedMultiMap.rst
  117. +34 −0 source/sdk/structs/Stack.rst
  118. +88 −0 source/sdk/text/Buffer.rst
  119. +41 −0 source/sdk/text/EscapeSequence.rst
  120. +114 −0 source/sdk/text/Regexp.rst
  121. +40 −0 source/sdk/text/Shlex.rst
  122. +12 −0 source/sdk/text/StringReader.rst
  123. +22 −0 source/sdk/text/StringTemplate.rst
  124. +83 −0 source/sdk/text/StringTokenizer.rst
  125. +39 −0 source/sdk/text/regexp/PCRE.rst
  126. +20 −0 source/sdk/text/regexp/POSIX.rst
  127. +44 −0 source/sdk/text/regexp/Regexp.rst
  128. +26 −0 source/sdk/text/regexp/RegexpBackend.rst
  129. +37 −0 source/sdk/threading/Mutex.rst
  130. +10 −0 source/sdk/threading/Runnable.rst
  131. +16 −0 source/sdk/threading/Thread.rst
  132. +50 −0 source/sdk/threading/native/MutexUnix.rst
  133. +5 −0 source/sdk/threading/native/MutexWin32.rst
  134. +25 −0 source/sdk/threading/native/ThreadUnix.rst
  135. +33 −0 source/sdk/threading/native/ThreadWin32.rst
View
190 source/sdk/io/File.rst
@@ -0,0 +1,190 @@
+io/File
+=======
+
+.. module:: io/File
+
+.. class:: File
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new (path: :cover:`~lang/types String` ) -> :class:`~io/File File`
+
+ .. staticmethod:: new~parentFile (parent: :class:`~io/File File` , path: :cover:`~lang/types String` ) -> :class:`~io/File File`
+
+ .. staticmethod:: new~parentPath (parent, path: :cover:`~lang/types String` ) -> :class:`~io/File File`
+
+ .. method:: isDir -> :cover:`~lang/types Bool`
+
+ :return: true if it's a directory
+
+
+ .. method:: isFile -> :cover:`~lang/types Bool`
+
+ :return: true if it's a file (ie. not a directory nor a symbolic link)
+
+
+ .. method:: isLink -> :cover:`~lang/types Bool`
+
+ :return: true if the file is a symbolic link
+
+
+ .. method:: size -> :cover:`~lang/types LLong`
+
+ :return: the size of the file, in bytes
+
+
+ .. method:: exists -> :cover:`~lang/types Bool`
+
+ :return: true if the file exists and can be
+ opened for reading
+
+
+ .. method:: ownerPerm -> :cover:`~lang/types Int`
+
+ :return: the permissions for the owner of this file
+
+
+ .. method:: groupPerm -> :cover:`~lang/types Int`
+
+ :return: the permissions for the group of this file
+
+
+ .. method:: otherPerm -> :cover:`~lang/types Int`
+
+ :return: the permissions for the others (not owner, not group)
+
+
+ .. method:: name -> :cover:`~lang/types String`
+
+ :return: the last part of the path, e.g. for /etc/init.d/bluetooth
+ name() will return 'bluetooth'
+
+
+ .. method:: parent -> :class:`~io/File File`
+
+ :return: the parent of this file, e.g. for /etc/init.d/bluetooth
+ it will return /etc/init.d/ (as a File), or null if it's the
+ root directory.
+
+
+ .. method:: parentName -> :cover:`~lang/types String`
+
+ :return: the parent of this file, e.g. for /etc/init.d/bluetooth
+ it will return /etc/init.d/ (as a File), or null if it's the
+ root directory.
+
+
+ .. method:: mkdir -> :cover:`~lang/types Int`
+
+ create a directory at the path specified by this file,
+ with permissions 0c755 by default
+
+
+ .. method:: mkdir~withMode (mode: :cover:`~lang/types Int32` ) -> :cover:`~lang/types Int`
+
+ create a directory at the path specified by this file
+
+ :param mode: The permissions at the creation of the directory
+
+
+ .. method:: mkdirs
+
+ create a directory at the path specified by this file,
+ and all the parent directories if needed,
+ with permissions 0c755 by default
+
+
+ .. method:: mkdirs~withMode (mode: :cover:`~lang/types Int32` ) -> :cover:`~lang/types Int`
+
+ create a directory at the path specified by this file,
+ and all the parent directories if needed
+
+ :param mode: The permissions at the creation of the directory
+
+
+ .. method:: lastAccessed -> :cover:`~lang/types Long`
+
+ :return: the time of last access
+
+
+ .. method:: lastModified -> :cover:`~lang/types Long`
+
+ :return: the time of last modification
+
+
+ .. method:: created -> :cover:`~lang/types Long`
+
+ :return: the time of creation
+
+
+ .. method:: isRelative -> :cover:`~lang/types Bool`
+
+ :return: true if the function is relative to the current directory
+
+
+ .. method:: getPath -> :cover:`~lang/types String`
+
+ the path this file has been created with
+
+
+ .. method:: getAbsolutePath -> :cover:`~lang/types String`
+
+ The absolute path, e.g. "my/dir" => "/current/directory/my/dir"
+
+
+ .. method:: getAbsoluteFile -> :class:`~io/File File`
+
+ A file corresponding to the absolute path
+
+ :see: getAbsolutePath
+
+
+ .. method:: getChildrenNames -> :class:`~structs/ArrayList ArrayList<T>`
+
+ List the name of the children of this path
+ Works only on directories, obviously
+
+
+ .. method:: getChildren -> :class:`~structs/ArrayList ArrayList<T>`
+
+ List the children of this path
+ Works only on directories, obviously
+
+
+ .. method:: remove -> :cover:`~lang/types Int`
+
+ Tries to remove the file. This only works for files, not directories.
+
+
+ .. method:: copyTo (dstFile: :class:`~io/File File` )
+
+ Copies the content of this file to another
+
+ :param dstFile: the file to copy to
+
+
+ .. method:: read -> :cover:`~lang/types String`
+
+ .. method:: write~string (str: :cover:`~lang/types String` )
+
+ .. method:: write~reader (reader: :class:`~io/Reader Reader` )
+
+ .. method:: getChild (name: :cover:`~lang/types String` ) -> :class:`~io/File File`
+
+ Get a child of this path
+
+ :param name: The name of the child, relatively to this path
+
+
+ .. staticmethod:: getCwd -> :cover:`~lang/types String`
+
+ :return: the current working directory
+
+
+ .. field:: MAX_PATH_LENGTH -> :cover:`~lang/types Int`
+
+ .. field:: path -> :cover:`~lang/types String`
+
+ .. field:: separator -> :cover:`~lang/types Char`
+
+ .. field:: pathDelimiter -> :cover:`~lang/types Char`
+
View
56 source/sdk/io/FileReader.rst
@@ -0,0 +1,56 @@
+io/FileReader
+=============
+
+.. module:: io/FileReader
+
+.. function:: fopen (filename, mode: :cover:`~lang/types Char` *) -> :cover:`~lang/stdio FILE` *
+
+.. function:: fread (ptr: :cover:`~lang/types Pointer` , size, count: :cover:`~lang/types SizeT` , stream: :cover:`~lang/stdio FILE` *) -> :cover:`~lang/types SizeT`
+
+.. function:: ferror (stream: :cover:`~lang/stdio FILE` *) -> :cover:`~lang/types Int`
+
+.. function:: feof (stream: :cover:`~lang/stdio FILE` *) -> :cover:`~lang/types Int`
+
+.. function:: fseek (stream: :cover:`~lang/stdio FILE` *, offset: :cover:`~lang/types Long` , origin: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: ftell (stream: :cover:`~lang/stdio FILE` *) -> :cover:`~lang/types Long`
+
+.. class:: FileReader
+
+ :extends: :class:`~io/Reader Reader`
+ .. staticmethod:: new~withFile (fileObject: :class:`~io/File File` ) -> :class:`~io/FileReader FileReader`
+
+ .. method:: init~withFile (fileObject: :class:`~io/File File` )
+
+ .. staticmethod:: new~withName (fileName: :cover:`~lang/types String` ) -> :class:`~io/FileReader FileReader`
+
+ .. method:: init~withName (fileName: :cover:`~lang/types String` )
+
+ .. staticmethod:: new~withMode (fileName, mode: :cover:`~lang/types String` ) -> :class:`~io/FileReader FileReader`
+
+ .. method:: init~withMode (fileName, mode: :cover:`~lang/types String` )
+
+ .. method:: read (chars: :cover:`~lang/types String` , offset, count: :cover:`~lang/types Int` ) -> :cover:`~lang/types SizeT`
+
+ .. method:: read~char -> :cover:`~lang/types Char`
+
+ .. method:: readLine -> :cover:`~lang/types String`
+
+ .. method:: hasNext -> :cover:`~lang/types Bool`
+
+ .. method:: rewind (offset: :cover:`~lang/types Int` )
+
+ .. method:: mark -> :cover:`~lang/types Long`
+
+ .. method:: reset (marker: :cover:`~lang/types Long` )
+
+ .. method:: close
+
+ .. field:: file -> :cover:`~lang/stdio FILE` *
+
+.. var:: SEEK_CUR -> :cover:`~lang/types Int`
+
+.. var:: SEEK_SET -> :cover:`~lang/types Int`
+
+.. var:: SEEK_END -> :cover:`~lang/types Int`
+
View
36 source/sdk/io/FileWriter.rst
@@ -0,0 +1,36 @@
+io/FileWriter
+=============
+
+.. module:: io/FileWriter
+
+.. class:: FileWriter
+
+ :extends: :class:`~io/Writer Writer`
+ .. staticmethod:: new~withFile (fileObject: :class:`~io/File File` , append: :cover:`~lang/types Bool` ) -> :class:`~io/FileWriter FileWriter`
+
+ .. method:: init~withFile (fileObject: :class:`~io/File File` , append: :cover:`~lang/types Bool` )
+
+ .. staticmethod:: new~withFileOverwrite (fileObject: :class:`~io/File File` ) -> :class:`~io/FileWriter FileWriter`
+
+ .. method:: init~withFileOverwrite (fileObject: :class:`~io/File File` )
+
+ .. staticmethod:: new~withName (fileName: :cover:`~lang/types String` , append: :cover:`~lang/types Bool` ) -> :class:`~io/FileWriter FileWriter`
+
+ .. method:: init~withName (fileName: :cover:`~lang/types String` , append: :cover:`~lang/types Bool` )
+
+ .. staticmethod:: new~withNameOverwrite (fileName: :cover:`~lang/types String` ) -> :class:`~io/FileWriter FileWriter`
+
+ .. method:: init~withNameOverwrite (fileName: :cover:`~lang/types String` )
+
+ .. method:: write (chars: :cover:`~lang/types String` , length: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types SizeT`
+
+ .. method:: write~chr (chr: :cover:`~lang/types Char` )
+
+ .. method:: close
+
+ .. method:: writef (fmt: :cover:`~lang/types String` , ...)
+
+ .. method:: vwritef (fmt: :cover:`~lang/types String` , args: :cover:`~lang/vararg VaList` )
+
+ .. field:: file -> :cover:`~lang/stdio FStream`
+
View
32 source/sdk/io/Reader.rst
@@ -0,0 +1,32 @@
+io/Reader
+=========
+
+.. module:: io/Reader
+
+.. class:: Reader
+
+ :extends: :class:`~lang/types Object`
+ .. method:: read (chars: :cover:`~lang/types String` , offset, count: :cover:`~lang/types Int` ) -> :cover:`~lang/types SizeT`
+
+ .. method:: read~char -> :cover:`~lang/types Char`
+
+ .. method:: readUntil (end: :cover:`~lang/types Char` ) -> :cover:`~lang/types String`
+
+ .. method:: readLine -> :cover:`~lang/types String`
+
+ .. method:: peek -> :cover:`~lang/types Char`
+
+ .. method:: skipWhile (unwanted: :cover:`~lang/types Char` )
+
+ .. method:: hasNext -> :cover:`~lang/types Bool`
+
+ .. method:: rewind (offset: :cover:`~lang/types Int` )
+
+ .. method:: mark -> :cover:`~lang/types Long`
+
+ .. method:: reset (marker: :cover:`~lang/types Long` )
+
+ .. method:: skip (offset: :cover:`~lang/types Int` )
+
+ .. field:: marker -> :cover:`~lang/types Long`
+
View
29 source/sdk/io/Writer.rst
@@ -0,0 +1,29 @@
+io/Writer
+=========
+
+.. module:: io/Writer
+
+.. class:: Writer
+
+ :extends: :class:`~lang/types Object`
+ .. method:: close
+
+ .. method:: write~chr (chr: :cover:`~lang/types Char` )
+
+ .. method:: write (chars: :cover:`~lang/types String` , length: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types SizeT`
+
+ .. method:: write~implicitLength (chars: :cover:`~lang/types String` ) -> :cover:`~lang/types SizeT`
+
+ .. method:: write~fromReader (source: :class:`~io/Reader Reader` , bufferSize: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types SizeT`
+
+ Copies data from a Reader into this Writer.
+
+ :param bufferSize: size in bytes of the internal transfer buffer
+ :return: total bytes transfered
+
+
+ .. method:: write~fromReaderDefaultBufferSize (source: :class:`~io/Reader Reader` )
+
+ Same as write(source, bufferSize) except uses a default buffer size of 8192 bytes.
+
+
View
114 source/sdk/io/native/FileUnix.rst
@@ -0,0 +1,114 @@
+io/native/FileUnix
+==================
+
+.. module:: io/native/FileUnix
+
+.. function:: realpath (path, resolved: :cover:`~lang/types String` ) -> :cover:`~lang/types String`
+
+.. function:: _getcwd (buf: :cover:`~lang/types String` , size: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types String`
+
+.. function:: S_ISDIR (...) -> :cover:`~lang/types Bool`
+
+.. function:: S_ISREG (...) -> :cover:`~lang/types Bool`
+
+.. function:: S_ISLNK (...) -> :cover:`~lang/types Bool`
+
+.. function:: S_IRWXU (...)
+
+.. function:: S_IRWXG (...)
+
+.. function:: S_IRWXO (...)
+
+.. function:: lstat (:cover:`~lang/types String` , :cover:`~io/native/FileUnix FileStat` *) -> :cover:`~lang/types Int`
+
+.. function:: _mkdir (:cover:`~lang/types String` , :cover:`~io/native/FileUnix ModeT` ) -> :cover:`~lang/types Int`
+
+.. function:: remove (path: :cover:`~lang/types String` ) -> :cover:`~lang/types Int`
+
+.. function:: _remove (path: :cover:`~lang/types String` ) -> :cover:`~lang/types Int`
+
+.. cover:: ModeT
+
+ :from: ``mode_t``
+.. cover:: FileStat
+
+ :from: ``struct stat``
+.. class:: FileUnix
+
+ :extends: :class:`~io/File File`
+ .. staticmethod:: new~unix (path: :cover:`~lang/types String` ) -> :class:`~io/native/FileUnix FileUnix`
+
+ .. method:: init~unix (path: :cover:`~lang/types String` )
+
+ .. method:: isDir -> :cover:`~lang/types Bool`
+
+ @return true if it's a directory
+
+
+ .. method:: isFile -> :cover:`~lang/types Bool`
+
+ @return true if it's a file (ie. not a directory nor a symbolic link)
+
+
+ .. method:: isLink -> :cover:`~lang/types Bool`
+
+ @return true if the file is a symbolic link
+
+
+ .. method:: size -> :cover:`~lang/types LLong`
+
+ @return the size of the file, in bytes
+
+
+ .. method:: ownerPerm -> :cover:`~lang/types Int`
+
+ @return the permissions for the owner of this file
+
+
+ .. method:: groupPerm -> :cover:`~lang/types Int`
+
+ @return the permissions for the group of this file
+
+
+ .. method:: otherPerm -> :cover:`~lang/types Int`
+
+ @return the permissions for the others (not owner, not group)
+
+
+ .. method:: lastAccessed -> :cover:`~lang/types Long`
+
+ @return the time of last access, or -1 if it doesn't exist
+
+
+ .. method:: lastModified -> :cover:`~lang/types Long`
+
+ @return the time of last modification, or -1 if it doesn't exist
+
+
+ .. method:: created -> :cover:`~lang/types Long`
+
+ @return the time of creation, or -1 if it doesn't exist
+
+
+ .. method:: isRelative -> :cover:`~lang/types Bool`
+
+ @return true if the function is relative to the current directory
+
+
+ .. method:: getAbsolutePath -> :cover:`~lang/types String`
+
+ The absolute path, e.g. "my/dir" => "/current/directory/my/dir"
+
+
+ .. method:: getAbsoluteFile -> :class:`~io/File File`
+
+ A file corresponding to the absolute path
+ @see getAbsolutePath
+
+
+ .. method:: getChildrenNames -> :class:`~structs/ArrayList ArrayList<T>`
+
+ .. method:: getChildren -> :class:`~structs/ArrayList ArrayList<T>`
+
+ .. method:: mkdir~withMode (mode: :cover:`~lang/types Int32` ) -> :cover:`~lang/types Int`
+
View
117 source/sdk/io/native/FileWin32.rst
@@ -0,0 +1,117 @@
+io/native/FileWin32
+===================
+
+.. module:: io/native/FileWin32
+
+.. function:: FindFirstFile (:cover:`~lang/types String` , :cover:`~io/native/FileWin32 FindData` *) -> :cover:`~native/win32/types Handle`
+
+.. function:: FindNextFile (:cover:`~native/win32/types Handle` , :cover:`~io/native/FileWin32 FindData` *) -> :cover:`~lang/types Bool`
+
+.. function:: FindClose (:cover:`~native/win32/types Handle` )
+
+.. function:: GetFileAttributes (:cover:`~lang/types String` ) -> :cover:`~lang/types Long`
+
+.. function:: CreateDirectory (:cover:`~lang/types String` , :cover:`~lang/types Pointer` ) -> :cover:`~lang/types Bool`
+
+.. function:: _remove (path: :cover:`~lang/types String` ) -> :cover:`~lang/types Int`
+
+.. cover:: FindData
+
+ :from: ``WIN32_FIND_DATA``
+.. class:: FileWin32
+
+ :extends: :class:`~io/File File`
+ .. staticmethod:: new~win32 (path: :cover:`~lang/types String` ) -> :class:`~io/native/FileWin32 FileWin32`
+
+ .. method:: init~win32 (path: :cover:`~lang/types String` )
+
+ .. method:: exists -> :cover:`~lang/types Bool`
+
+ @return true if the file exists and can be
+ opened for reading
+
+
+ .. method:: findSingle (ffdPtr: :cover:`~io/native/FileWin32 FindData` *)
+
+ .. method:: findFirst (ffdPtr: :cover:`~io/native/FileWin32 FindData` *) -> :cover:`~native/win32/types Handle`
+
+ .. method:: isDir -> :cover:`~lang/types Bool`
+
+ @return true if it's a directory
+
+
+ .. method:: isFile -> :cover:`~lang/types Bool`
+
+ @return true if it's a file (ie. not a directory nor a symbolic link)
+
+
+ .. method:: isLink -> :cover:`~lang/types Bool`
+
+ @return true if the file is a symbolic link
+
+
+ .. method:: size -> :cover:`~lang/types LLong`
+
+ @return the size of the file, in bytes
+
+
+ .. method:: ownerPerm -> :cover:`~lang/types Int`
+
+ @return the permissions for the owner of this file
+
+
+ .. method:: groupPerm -> :cover:`~lang/types Int`
+
+ @return the permissions for the group of this file
+
+
+ .. method:: otherPerm -> :cover:`~lang/types Int`
+
+ @return the permissions for the others (not owner, not group)
+
+
+ .. method:: mkdir~withMode (mode: :cover:`~lang/types Int32` ) -> :cover:`~lang/types Int`
+
+ .. method:: lastAccessed -> :cover:`~lang/types Long`
+
+ @return the time of last access
+
+
+ .. method:: lastModified -> :cover:`~lang/types Long`
+
+ @return the time of last modification
+
+
+ .. method:: created -> :cover:`~lang/types Long`
+
+ @return the time of creation
+
+
+ .. method:: isRelative -> :cover:`~lang/types Bool`
+
+ @return true if the function is relative to the current directory
+
+
+ .. method:: getAbsolutePath -> :cover:`~lang/types String`
+
+ The absolute path, e.g. "my/dir" => "/current/directory/my/dir"
+
+
+ .. method:: getChildrenNames -> :class:`~structs/ArrayList ArrayList<T>`
+
+ List the name of the children of this path
+ Works only on directories, obviously
+
+
+ .. method:: getChildren -> :class:`~structs/ArrayList ArrayList<T>`
+
+ List the children of this path
+ Works only on directories, obviously
+
+
+.. var:: FILE_ATTRIBUTE_DIRECTORY -> :cover:`~lang/types Long`
+
+.. var:: FILE_ATTRIBUTE_NORMAL -> :cover:`~lang/types Long`
+
+.. var:: FILE_ATTRIBUTE_REPARSE_POINT -> :cover:`~lang/types Long`
+
View
25 source/sdk/io/native/dirent.rst
@@ -0,0 +1,25 @@
+io/native/dirent
+================
+
+.. module:: io/native/dirent
+
+.. function:: closedir (:cover:`~io/native/dirent DirPtr` ) -> :cover:`~lang/types Int`
+
+.. function:: opendir (:cover:`~lang/types String` ) -> :cover:`~io/native/dirent DirPtr`
+
+.. function:: readdir (:cover:`~io/native/dirent DirPtr` ) -> :cover:`~io/native/dirent DirEnt` *
+
+.. function:: readdir_r (:cover:`~io/native/dirent DirPtr` , :cover:`~io/native/dirent DirEnt` *, :cover:`~io/native/dirent DirEnt` **) -> :cover:`~lang/types Int`
+
+.. function:: rewinddir (:cover:`~io/native/dirent DirPtr` )
+
+.. function:: seekdir (:cover:`~io/native/dirent DirPtr` , :cover:`~lang/types Long` )
+
+.. function:: telldir (:cover:`~io/native/dirent DirPtr` ) -> :cover:`~lang/types Long`
+
+.. cover:: DirPtr
+
+ :from: ``DIR*``
+.. cover:: DirEnt
+
+ :from: ``struct dirent``
View
53 source/sdk/lang/math.rst
@@ -0,0 +1,53 @@
+lang/math
+=========
+
+.. module:: lang/math
+
+.. function:: cos (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: sin (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: tan (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: acos (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: asin (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: atan (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: atan2 (:cover:`~lang/types Double` , :cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: sqrt (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: pow (:cover:`~lang/types Double` , :cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: srand (:cover:`~lang/types Int` )
+
+.. function:: rand -> :cover:`~lang/types Int`
+
+.. function:: log~Double (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: log~Float (:cover:`~lang/types Float` ) -> :cover:`~lang/types Float`
+
+.. function:: log~Long (:cover:`~lang/types LDouble` ) -> :cover:`~lang/types LDouble`
+
+.. function:: log10~Double (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: log10~Float (:cover:`~lang/types Float` ) -> :cover:`~lang/types Float`
+
+.. function:: log10~Long (:cover:`~lang/types LDouble` ) -> :cover:`~lang/types LDouble`
+
+.. function:: round~dl (:cover:`~lang/types Double` ) -> :cover:`~lang/types Long`
+
+.. function:: ceil~Double (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: ceil~Float (:cover:`~lang/types Float` ) -> :cover:`~lang/types Float`
+
+.. function:: ceil~Long (:cover:`~lang/types LDouble` ) -> :cover:`~lang/types LDouble`
+
+.. function:: floor~Double (:cover:`~lang/types Double` ) -> :cover:`~lang/types Double`
+
+.. function:: floor~Float (:cover:`~lang/types Float` ) -> :cover:`~lang/types Float`
+
+.. function:: floor~Long (:cover:`~lang/types LDouble` ) -> :cover:`~lang/types LDouble`
+
View
31 source/sdk/lang/memory.rst
@@ -0,0 +1,31 @@
+lang/memory
+===========
+
+.. module:: lang/memory
+
+.. function:: gc_malloc (size: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Pointer`
+
+.. function:: gc_malloc_atomic (size: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Pointer`
+
+.. function:: gc_realloc (ptr: :cover:`~lang/types Pointer` , size: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Pointer`
+
+.. function:: gc_calloc (nmemb, size: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Pointer`
+
+.. function:: gc_register_finalizer (obj: :cover:`~lang/types Pointer` , callback: :cover:`~lang/memory GC_finalization_proc` , userdata, oldObj, oldCallback: :cover:`~lang/types Pointer` )
+
+.. function:: gc_invoke_finalizers
+
+.. function:: sizeof (...) -> :cover:`~lang/types SizeT`
+
+.. function:: memset (:cover:`~lang/types Pointer` , :cover:`~lang/types Int` , :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Pointer`
+
+.. function:: memcmp (:cover:`~lang/types Pointer` , :cover:`~lang/types Pointer` , :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Int`
+
+.. function:: memmove (:cover:`~lang/types Pointer` , :cover:`~lang/types Pointer` , :cover:`~lang/types SizeT` )
+
+.. function:: memcpy (:cover:`~lang/types Pointer` , :cover:`~lang/types Pointer` , :cover:`~lang/types SizeT` )
+
+.. function:: free (:cover:`~lang/types Pointer` )
+
+.. cover:: GC_finalization_proc
+
View
84 source/sdk/lang/stdio.rst
@@ -0,0 +1,84 @@
+lang/stdio
+==========
+
+.. module:: lang/stdio
+
+.. function:: println~withStr (str: :cover:`~lang/types String` )
+
+.. function:: println
+
+.. function:: printf (:cover:`~lang/types Char` *, ...) -> :cover:`~lang/types Int`
+
+.. function:: fprintf (:cover:`~lang/stdio FStream` , :cover:`~lang/types Char` *, ...) -> :cover:`~lang/types Int`
+
+.. function:: sprintf (:cover:`~lang/types Char` *, :cover:`~lang/types Char` *, ...) -> :cover:`~lang/types Int`
+
+.. function:: snprintf (:cover:`~lang/types Char` *, :cover:`~lang/types Int` , :cover:`~lang/types Char` *, ...) -> :cover:`~lang/types Int`
+
+.. function:: vprintf (:cover:`~lang/types Char` *, :cover:`~lang/vararg VaList` ) -> :cover:`~lang/types Int`
+
+.. function:: vfprintf (:cover:`~lang/stdio FStream` , :cover:`~lang/types Char` *, :cover:`~lang/vararg VaList` ) -> :cover:`~lang/types Int`
+
+.. function:: vsprintf (:cover:`~lang/types Char` *, :cover:`~lang/types Char` *, :cover:`~lang/vararg VaList` ) -> :cover:`~lang/types Int`
+
+.. function:: vsnprintf (:cover:`~lang/types Char` *, :cover:`~lang/types Int` , :cover:`~lang/types Char` *, :cover:`~lang/vararg VaList` ) -> :cover:`~lang/types Int`
+
+.. function:: fread (ptr: :cover:`~lang/types Pointer` , size, nmemb: :cover:`~lang/types SizeT` , stream: :cover:`~lang/stdio FStream` ) -> :cover:`~lang/types SizeT`
+
+.. function:: fwrite (ptr: :cover:`~lang/types Pointer` , size, nmemb: :cover:`~lang/types SizeT` , stream: :cover:`~lang/stdio FStream` ) -> :cover:`~lang/types SizeT`
+
+.. function:: feof (stream: :cover:`~lang/stdio FStream` ) -> :cover:`~lang/types Int`
+
+.. function:: fopen (:cover:`~lang/types Char` *, :cover:`~lang/types Char` *) -> :cover:`~lang/stdio FStream`
+
+.. function:: fclose (:cover:`~lang/stdio FStream` ) -> :cover:`~lang/types Int`
+
+.. function:: fflush (stream: :cover:`~lang/stdio FStream` )
+
+.. function:: fputc (:cover:`~lang/types Char` , :cover:`~lang/stdio FStream` )
+
+.. function:: fputs (:cover:`~lang/types Char` *, :cover:`~lang/stdio FStream` )
+
+.. function:: scanf (format: :cover:`~lang/types Char` *, ...) -> :cover:`~lang/types Int`
+
+.. function:: fscanf (stream: :cover:`~lang/stdio FStream` , format: :cover:`~lang/types Char` *, ...) -> :cover:`~lang/types Int`
+
+.. function:: sscanf (str, format: :cover:`~lang/types Char` *, ...) -> :cover:`~lang/types Int`
+
+.. function:: vscanf (format: :cover:`~lang/types Char` *, ap: :cover:`~lang/vararg VaList` ) -> :cover:`~lang/types Int`
+
+.. function:: vfscanf (stream: :cover:`~lang/stdio FStream` , format: :cover:`~lang/types Char` *, ap: :cover:`~lang/vararg VaList` ) -> :cover:`~lang/types Int`
+
+.. function:: vsscanf (str, format: :cover:`~lang/types Char` *, ap: :cover:`~lang/vararg VaList` ) -> :cover:`~lang/types Int`
+
+.. function:: fgets (str: :cover:`~lang/types Char` *, length: :cover:`~lang/types SizeT` , stream: :cover:`~lang/stdio FStream` ) -> :cover:`~lang/types Char` *
+
+.. cover:: FILE
+
+.. cover:: FStream
+
+ :from: ``FILE*``
+ .. method:: open (filename: :cover:`~lang/types String` , mode: :cover:`~lang/types String` ) -> :cover:`~lang/stdio FStream`
+
+ .. method:: close -> :cover:`~lang/types Int`
+
+ .. method:: flush
+
+ .. method:: readChar -> :cover:`~lang/types Char`
+
+ .. method:: readLine -> :cover:`~lang/types String`
+
+ .. method:: hasNext -> :cover:`~lang/types Bool`
+
+ .. method:: write~chr (chr: :cover:`~lang/types Char` )
+
+ .. method:: write (str: :cover:`~lang/types String` )
+
+ .. method:: write~precise (str: :cover:`~lang/types Char` *, offset, length: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types SizeT`
+
+.. var:: stdout -> :cover:`~lang/stdio FStream`
+
+.. var:: stderr -> :cover:`~lang/stdio FStream`
+
+.. var:: stdin -> :cover:`~lang/stdio FStream`
+
View
11 source/sdk/lang/string.rst
@@ -0,0 +1,11 @@
+lang/string
+===========
+
+.. module:: lang/string
+
+.. function:: strcmp (:cover:`~lang/types Char` *, :cover:`~lang/types Char` *) -> :cover:`~lang/types Int`
+
+.. function:: strncmp (:cover:`~lang/types Char` *, :cover:`~lang/types Char` *, :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: strstr (:cover:`~lang/types Char` *, :cover:`~lang/types Char` *)
+
View
7 source/sdk/lang/system.rst
@@ -0,0 +1,7 @@
+lang/system
+===========
+
+.. module:: lang/system
+
+.. function:: exit (:cover:`~lang/types Int` )
+
View
620 source/sdk/lang/types.rst
@@ -0,0 +1,620 @@
+lang/types
+==========
+
+.. module:: lang/types
+
+.. function:: strtol (:cover:`~lang/types Char` *, :cover:`~lang/types Pointer` , :cover:`~lang/types Int` ) -> :cover:`~lang/types Long`
+
+.. function:: strtoll (:cover:`~lang/types Char` *, :cover:`~lang/types Pointer` , :cover:`~lang/types Int` ) -> :cover:`~lang/types LLong`
+
+.. function:: strtoul (:cover:`~lang/types Char` *, :cover:`~lang/types Pointer` , :cover:`~lang/types Int` ) -> :cover:`~lang/types ULong`
+
+.. function:: strtof (:cover:`~lang/types Char` *, :cover:`~lang/types Pointer` ) -> :cover:`~lang/types Float`
+
+.. function:: strtod (:cover:`~lang/types Char` *, :cover:`~lang/types Pointer` ) -> :cover:`~lang/types Double`
+
+.. function:: strtold (:cover:`~lang/types Char` *, :cover:`~lang/types Pointer` ) -> :cover:`~lang/types LDouble`
+
+.. function:: strlen (:cover:`~lang/types Char` *) -> :cover:`~lang/types Int`
+
+.. cover:: Void
+
+ :from: ``void``
+.. cover:: Pointer
+
+ :from: ``void*``
+ .. method:: toString -> :cover:`~lang/types String`
+
+.. cover:: Char
+
+ :from: ``char``
+ .. method:: isAlphaNumeric -> :cover:`~lang/types Bool`
+
+ check for an alphanumeric character
+
+ .. method:: isAlpha -> :cover:`~lang/types Bool`
+
+ check for an alphabetic character
+
+ .. method:: isLower -> :cover:`~lang/types Bool`
+
+ check for a lowercase alphabetic character
+
+ .. method:: isUpper -> :cover:`~lang/types Bool`
+
+ check for an uppercase alphabetic character
+
+ .. method:: isDigit -> :cover:`~lang/types Bool`
+
+ check for a decimal digit (0 through 9)
+
+ .. method:: isHexDigit -> :cover:`~lang/types Bool`
+
+ check for a hexadecimal digit (0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F)
+
+ .. method:: isControl -> :cover:`~lang/types Bool`
+
+ check for a control character
+
+ .. method:: isGraph -> :cover:`~lang/types Bool`
+
+ check for any printable character except space
+
+ .. method:: isPrintable -> :cover:`~lang/types Bool`
+
+ check for any printable character including space
+
+ .. method:: isPunctuation -> :cover:`~lang/types Bool`
+
+ check for any printable character which is not a space or an alphanumeric character
+
+ .. method:: isWhitespace -> :cover:`~lang/types Bool`
+
+ check for white-space characters: space, form-feed ('\\f'), newline ('\\n'),
+ carriage return ('\\r'), horizontal tab ('\\t'), and vertical tab ('\\v')
+
+ .. method:: isBlank -> :cover:`~lang/types Bool`
+
+ check for a blank character; that is, a space or a tab
+
+ .. method:: toInt -> :cover:`~lang/types Int`
+
+ convert to an integer. This only works for digits, otherwise -1 is returned
+
+ .. method:: toLower -> :cover:`~lang/types Char`
+
+ return the lowered character
+
+ .. method:: toUpper -> :cover:`~lang/types Char`
+
+ return the capitalized character
+
+ .. method:: toString -> :cover:`~lang/types String`
+
+ return a one-character string containing this character.
+
+ .. method:: print
+
+ write this character to stdout without a following newline.
+
+ .. method:: println
+
+ write this character to stdout, followed by a newline
+
+.. cover:: SChar
+
+ :extends: :cover:`~lang/types Char`
+ :from: ``signed char``
+.. cover:: UChar
+
+ :extends: :cover:`~lang/types Char`
+ :from: ``unsigned char``
+.. cover:: WChar
+
+ :from: ``wchar_t``
+.. cover:: String
+
+ :from: ``Char*``
+ .. method:: new~withLength (length: :cover:`~lang/types Int` ) -> :cover:`~lang/types String`
+
+ Create a new string exactly *length* characters long (without the nullbyte).
+ The contents of the string are undefined.
+
+ .. method:: new~withChar (c: :cover:`~lang/types Char` ) -> :cover:`~lang/types String`
+
+ Create a new string of the length 1 containing only the character *c
+
+ .. method:: compare (other: :cover:`~lang/types String` , start, length: :cover:`~lang/types Int` ) -> :cover:`~lang/types Bool`
+
+ compare *length* characters of *this* with *other*, starting at *start*.
+ Return true if the two strings are equal, return false if they are not.
+
+ .. method:: compare~implicitLength (other: :cover:`~lang/types String` , start: :cover:`~lang/types Int` ) -> :cover:`~lang/types Bool`
+
+ compare *this* with *other*, starting at *start*. The count of compared
+ characters is determined by *other*'s length.
+
+ .. method:: compare~whole (other: :cover:`~lang/types String` ) -> :cover:`~lang/types Bool`
+
+ compare *this* with *other*, starting at 0. Compare ``other length()`` characters.
+
+ .. method:: length -> :cover:`~lang/types Int`
+
+ return the string's length, excluding the null byte.
+
+ .. method:: equals (other: :cover:`~lang/types String` ) -> :cover:`~lang/types Bool`
+
+ return true if *other* and *this* are equal. This also returns false if either
+ of these two is ``null``.
+
+ .. method:: toInt -> :cover:`~lang/types Int`
+
+ convert the string's contents to Int.
+
+ .. method:: toInt~withBase (base: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ .. method:: toLong -> :cover:`~lang/types Long`
+
+ convert the string's contents to Long.
+
+ .. method:: toLong~withBase (base: :cover:`~lang/types Long` ) -> :cover:`~lang/types Long`
+
+ .. method:: toLLong -> :cover:`~lang/types LLong`
+
+ convert the string's contents to Long Long.
+
+ .. method:: toLLong~withBase (base: :cover:`~lang/types LLong` ) -> :cover:`~lang/types LLong`
+
+ .. method:: toULong -> :cover:`~lang/types ULong`
+
+ convert the string's contents to Unsigned Long.
+
+ .. method:: toULong~withBase (base: :cover:`~lang/types ULong` ) -> :cover:`~lang/types ULong`
+
+ .. method:: toFloat -> :cover:`~lang/types Float`
+
+ convert the string's contents to Float.
+
+ .. method:: toDouble -> :cover:`~lang/types Double`
+
+ convert the string's contents to Double.
+
+ .. method:: toLDouble -> :cover:`~lang/types LDouble`
+
+ convert the string's contents to Long Double.
+
+ .. method:: isEmpty -> :cover:`~lang/types Bool`
+
+ return true if the string is empty or ``null``.
+
+ .. method:: startsWith (s: :cover:`~lang/types String` ) -> :cover:`~lang/types Bool`
+
+ return true if the first characters of *this* are equal to *s*.
+
+ .. method:: startsWith~withChar (c: :cover:`~lang/types Char` ) -> :cover:`~lang/types Bool`
+
+ return true if the first character of *this* is equal to *c*.
+
+ .. method:: endsWith (s: :cover:`~lang/types String` ) -> :cover:`~lang/types Bool`
+
+ return true if the last characters of *this* are equal to *s*.
+
+ .. method:: indexOf~charZero (c: :cover:`~lang/types Char` ) -> :cover:`~lang/types Int`
+
+ return the index of *c*, starting at 0. If *this* does not contain
+ c*, return -1.
+
+ .. method:: indexOf~char (c: :cover:`~lang/types Char` , start: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ return the index of *c*, but only check characters ``start..length``.
+ However, the return value is the index of the *c* relative to the
+ string's beginning. If *this* does not contain *c*, return -1.
+
+ .. method:: indexOf~stringZero (s: :cover:`~lang/types String` ) -> :cover:`~lang/types Int`
+
+ return the index of *s*, starting at 0. If *this* does not contain *s*,
+ return -1.
+
+ .. method:: indexOf~string (s: :cover:`~lang/types String` , start: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ return the index of *s*, but only check characters ``start..length``.
+ However, the return value is relative to the *this*' first character.
+ If *this* does not contain *c*, return -1.
+
+ .. method:: contains~char (c: :cover:`~lang/types Char` ) -> :cover:`~lang/types Bool`
+
+ return *true* if *this* contains the character *c
+
+ .. method:: contains~string (s: :cover:`~lang/types String` ) -> :cover:`~lang/types Bool`
+
+ return *true* if *this* contains the string *s
+
+ .. method:: trim~space -> :cover:`~lang/types String`
+
+ return a copy of *this* with space characters (ASCII 32) stripped at both ends.
+
+ .. method:: trim (c: :cover:`~lang/types Char` ) -> :cover:`~lang/types String`
+
+ return a copy of *this* with *c* characters stripped at both ends.
+
+ .. method:: trim~string (s: :cover:`~lang/types String` ) -> :cover:`~lang/types String`
+
+ return a copy of *this* with all characters contained by *s* stripped
+ at both ends.
+
+ .. method:: trimLeft~space -> :cover:`~lang/types String`
+
+ return a copy of *this* with space characters (ASCII 32) stripped from the left side.
+
+ .. method:: trimLeft (c: :cover:`~lang/types Char` ) -> :cover:`~lang/types String`
+
+ return a copy of *this* with *c* characters stripped from the left side.
+
+ .. method:: trimLeft~string (s: :cover:`~lang/types String` ) -> :cover:`~lang/types String`
+
+ return a copy of *this* with all characters contained by *s* stripped
+ from the left side.
+
+ .. method:: trimRight~space -> :cover:`~lang/types String`
+
+ return a copy of *this* with space characters (ASCII 32) stripped from the right side.
+
+ .. method:: trimRight (c: :cover:`~lang/types Char` ) -> :cover:`~lang/types String`
+
+ return a copy of *this* with *c* characters stripped from the right side.
+
+ .. method:: trimRight~string (s: :cover:`~lang/types String` ) -> :cover:`~lang/types String`
+
+ return a copy of *this* with all characters contained by *s* stripped
+ from the right side.
+
+ .. method:: first -> :cover:`~lang/types Char`
+
+ return the first character of *this*. If *this* is empty, 0 is returned.
+
+ .. method:: lastIndex -> :cover:`~lang/types Int`
+
+ return the index of the last character of *this*. If *this* is empty,
+ -1 is returned.
+
+ .. method:: last -> :cover:`~lang/types Char`
+
+ return the last character of *this*.
+
+ .. method:: lastIndexOf (c: :cover:`~lang/types Char` ) -> :cover:`~lang/types Int`
+
+ return the index of the last occurence of *c* in *this*.
+ If *this* does not contain *c*, return -1.
+
+ .. method:: substring~tillEnd (start: :cover:`~lang/types Int` ) -> :cover:`~lang/types String`
+
+ return a substring of *this* only containing the characters
+ in the range ``start..length``.
+
+ .. method:: substring (start, end: :cover:`~lang/types Int` ) -> :cover:`~lang/types String`
+
+ return a substring of *this* only containing the characters in the
+ range ``start..end``.
+
+ .. method:: reverse -> :cover:`~lang/types String`
+
+ return a reversed copy of *this*.
+
+ .. method:: print
+
+ print *this* to stdout without a following newline. Flush stdout.
+
+ .. method:: println
+
+ print *this* followed by a newline.
+
+ .. method:: times (count: :cover:`~lang/types Int` ) -> :cover:`~lang/types String`
+
+ return a string that contains *this*, repeated *count* times.
+
+ .. method:: clone -> :cover:`~lang/types String`
+
+ return a copy of *this*.
+
+ .. method:: append (other: :cover:`~lang/types String` ) -> :cover:`~lang/types String`
+
+ return a string that contains *this* followed by *other*.
+
+ .. method:: append~char (other: :cover:`~lang/types Char` ) -> :cover:`~lang/types String`
+
+ return a string containing *this* followed by *other*.
+
+ .. method:: count~char (what: :cover:`~lang/types Char` ) -> :cover:`~lang/types Int`
+
+ return the number of *what*'s occurences in *this*.
+
+ .. method:: count~string (what: :cover:`~lang/types String` ) -> :cover:`~lang/types Int`
+
+ return the number of *what*'s non-overlapping occurences in *this*.
+
+ .. method:: replace (oldie, kiddo: :cover:`~lang/types Char` ) -> :cover:`~lang/types String`
+
+ clone myself, return all occurences of *oldie* with *kiddo* and return it.
+
+ .. method:: replace~string (oldie, kiddo: :cover:`~lang/types String` ) -> :cover:`~lang/types String`
+
+ clone myself, return all occurences of *oldie* with *kiddo* and return it.
+
+ .. method:: prepend (other: :cover:`~lang/types String` ) -> :cover:`~lang/types String`
+
+ return a new string containg *other* followed by *this*.
+
+ .. method:: prepend~char (other: :cover:`~lang/types Char` ) -> :cover:`~lang/types String`
+
+ return a new string containing *other* followed by *this*.
+
+ .. method:: toLower -> :cover:`~lang/types String`
+
+ return a new string with all characters lowercased (if possible).
+
+ .. method:: toUpper -> :cover:`~lang/types String`
+
+ return a new string with all characters uppercased (if possible).
+
+ .. method:: charAt (index: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Char`
+
+ return the character at position #*index* (starting at 0)
+
+ .. method:: format (...) -> :cover:`~lang/types String`
+
+ return a string formatted using *this* as template.
+
+ .. method:: scanf (format: :cover:`~lang/types String` , ...) -> :cover:`~lang/types Int`
+
+ .. method:: iterator -> :class:`~lang/types StringIterator<T>`
+
+.. cover:: LLong
+
+ :from: ``signed long long``
+ .. method:: toString -> :cover:`~lang/types String`
+
+ .. method:: toHexString -> :cover:`~lang/types String`
+
+ .. method:: isOdd -> :cover:`~lang/types Bool`
+
+ .. method:: isEven -> :cover:`~lang/types Bool`
+
+ .. method:: in (range: :cover:`~lang/types Range` ) -> :cover:`~lang/types Bool`
+
+.. cover:: Long
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``signed long``
+.. cover:: Int
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``signed int``
+.. cover:: Short
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``signed short``
+.. cover:: ULLong
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``unsigned long long``
+ .. method:: toString -> :cover:`~lang/types String`
+
+ .. method:: in (range: :cover:`~lang/types Range` ) -> :cover:`~lang/types Bool`
+
+.. cover:: ULong
+
+ :extends: :cover:`~lang/types ULLong`
+ :from: ``unsigned long``
+.. cover:: UInt
+
+ :extends: :cover:`~lang/types ULLong`
+ :from: ``unsigned int``
+.. cover:: UShort
+
+ :extends: :cover:`~lang/types ULLong`
+ :from: ``unsigned short``
+.. cover:: Int8
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``int8_t``
+.. cover:: Int16
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``int16_t``
+.. cover:: Int32
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``int32_t``
+.. cover:: Int64
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``int64_t``
+.. cover:: UInt8
+
+ :extends: :cover:`~lang/types ULLong`
+ :from: ``uint8_t``
+.. cover:: UInt16
+
+ :extends: :cover:`~lang/types ULLong`
+ :from: ``uint16_t``
+.. cover:: UInt32
+
+ :extends: :cover:`~lang/types ULLong`
+ :from: ``uint32_t``
+.. cover:: UInt64
+
+ :extends: :cover:`~lang/types ULLong`
+ :from: ``uint64_t``
+.. cover:: Octet
+
+ :extends: :cover:`~lang/types ULLong`
+ :from: ``UInt8``
+.. cover:: SizeT
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``size_t``
+.. cover:: PtrDiffT
+
+ :extends: :cover:`~lang/types LLong`
+ :from: ``ptrdiff_t``
+.. cover:: Bool
+
+ :from: ``bool``
+ .. method:: toString -> :cover:`~lang/types String`
+
+.. cover:: LDouble
+
+ :from: ``long double``
+ .. method:: toString -> :cover:`~lang/types String`
+
+ .. method:: abs -> :cover:`~lang/types LDouble`
+
+.. cover:: Float
+
+ :extends: :cover:`~lang/types LDouble`
+ :from: ``float``
+.. cover:: Double
+
+ :extends: :cover:`~lang/types LDouble`
+ :from: ``double``
+.. cover:: Range
+
+ .. method:: new (min, max: :cover:`~lang/types Int` ) -> :cover:`~lang/types Range`
+
+.. class:: Class
+
+ :extends: :class:`~lang/types Object`
+ .. method:: alloc -> :class:`~lang/types Object`
+
+ create a new instance of the object of type defined by this class
+
+ .. method:: inheritsFrom (T: :class:`~lang/types Class` ) -> :cover:`~lang/types Bool`
+
+ return true if `this` is a subclass of *T* .
+
+ .. field:: instanceSize -> :cover:`~lang/types SizeT`
+
+ .. field:: size -> :cover:`~lang/types SizeT`
+
+ .. field:: name -> :cover:`~lang/types String`
+
+ .. field:: super -> :class:`~lang/types Class`
+
+ .. field:: __defaults__ -> Func
+
+ .. field:: __destroy__ -> Func
+
+ .. field:: __load__ -> Func
+
+.. class:: Object
+
+ .. method:: instanceOf (T: :class:`~lang/types Class` ) -> :cover:`~lang/types Bool`
+
+ return true if *class* is a subclass of *T*.
+
+ .. field:: class -> :class:`~lang/types Class`
+
+.. class:: Iterator<T>
+
+ :extends: :class:`~lang/types Object`
+ .. method:: hasNext -> :cover:`~lang/types Bool`
+
+ .. method:: next -> T
+
+ .. method:: hasPrev -> :cover:`~lang/types Bool`
+
+ .. method:: prev -> T
+
+ .. method:: remove -> :cover:`~lang/types Bool`
+
+ .. field:: T -> :class:`~lang/types Class`
+
+.. class:: Iterable<T>
+
+ :extends: :class:`~lang/types Object`
+ .. method:: iterator -> :class:`~lang/types Iterator<T>`
+
+ .. method:: toArrayList -> :class:`~structs/ArrayList ArrayList<T>`
+
+ return the contents of the iterable as ArrayList.
+
+ .. field:: T -> :class:`~lang/types Class`
+
+.. class:: Exception
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new~origin (origin: :class:`~lang/types Class` , msg: :cover:`~lang/types String` ) -> :class:`~lang/types Exception`
+
+ .. method:: init~origin (origin: :class:`~lang/types Class` , msg: :cover:`~lang/types String` )
+
+ .. staticmethod:: new~noOrigin (msg: :cover:`~lang/types String` ) -> :class:`~lang/types Exception`
+
+ .. method:: init~noOrigin (msg: :cover:`~lang/types String` )
+
+ .. method:: crash
+
+ .. method:: getMessage -> :cover:`~lang/types String`
+
+ .. method:: print
+
+ .. method:: throw
+
+ .. field:: origin -> :class:`~lang/types Class`
+
+ .. field:: msg -> :cover:`~lang/types String`
+
+.. class:: StringIterator<T>
+
+ :extends: :class:`~lang/types Iterator<T>`
+ .. staticmethod:: new~withStr (str: :cover:`~lang/types String` ) -> :class:`~lang/types StringIterator<T>`
+
+ .. method:: init~withStr (str: :cover:`~lang/types String` )
+
+ .. method:: hasNext -> :cover:`~lang/types Bool`
+
+ .. method:: next -> T
+
+ .. method:: hasPrev -> :cover:`~lang/types Bool`
+
+ .. method:: prev -> T
+
+ .. method:: remove -> :cover:`~lang/types Bool`
+
+ .. field:: i -> :cover:`~lang/types Int`
+
+ .. field:: str -> :cover:`~lang/types String`
+
+.. class:: None
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new -> :class:`~lang/types None`
+
+ .. method:: init
+
+.. class:: Cell<T>
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new (val: T ) -> :class:`~lang/types Cell<T>`
+
+ .. method:: init (val: T )
+
+ .. field:: T -> :class:`~lang/types Class`
+
+ .. field:: val -> T
+
+.. var:: INT_MAX -> :cover:`~lang/types Int`
+
+.. var:: INT_MIN -> :cover:`~lang/types Int`
+
+.. var:: DBL_MIN -> :cover:`~lang/types Double`
+
+.. var:: DBL_MAX -> :cover:`~lang/types Double`
+
+.. var:: FLT_MIN -> :cover:`~lang/types Float`
+
+.. var:: FLT_MAX -> :cover:`~lang/types Float`
+
+.. var:: LDBL_MIN -> :cover:`~lang/types LDouble`
+
+.. var:: LDBL_MAX -> :cover:`~lang/types LDouble`
+
View
14 source/sdk/lang/vararg.rst
@@ -0,0 +1,14 @@
+lang/vararg
+===========
+
+.. module:: lang/vararg
+
+.. function:: va_start (:cover:`~lang/vararg VaList` , ...)
+
+.. function:: va_arg (:cover:`~lang/vararg VaList` , ...)
+
+.. function:: va_end (:cover:`~lang/vararg VaList` )
+
+.. cover:: VaList
+
+ :from: ``va_list``
View
40 source/sdk/math/Random.rst
@@ -0,0 +1,40 @@
+math/Random
+===========
+
+.. module:: math/Random
+
+.. class:: Random
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new -> :class:`~math/Random Random`
+
+ .. method:: init
+
+ .. staticmethod:: random -> :cover:`~lang/types Int`
+
+ .. staticmethod:: randInt (start, end: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ .. staticmethod:: randInt~exclude (start, end: :cover:`~lang/types Int` , ex: :class:`~structs/List List<T>` ) -> :cover:`~lang/types Int`
+
+ .. staticmethod:: randRange (start, end: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ .. staticmethod:: randRange~exclude (start, end: :cover:`~lang/types Int` , ex: :class:`~structs/List List<T>` ) -> :cover:`~lang/types Int`
+
+ .. staticmethod:: choice (l: :class:`~structs/List List<T>` ) -> T
+
+ .. staticmethod:: exclude (start, end: :cover:`~lang/types Int` , ex: :class:`~structs/List List<T>` , f: Func ) -> :cover:`~lang/types Int`
+
+ .. staticmethod:: fastRandom -> :cover:`~lang/types Int`
+
+ .. staticmethod:: fastRandInt (start, end: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ .. staticmethod:: fastRandInt~exclude (start, end: :cover:`~lang/types Int` , ex: :class:`~structs/List List<T>` ) -> :cover:`~lang/types Int`
+
+ .. staticmethod:: fastRandRange (start, end: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ .. staticmethod:: fastRandRange~exclude (start, end: :cover:`~lang/types Int` , ex: :class:`~structs/List List<T>` ) -> :cover:`~lang/types Int`
+
+ .. field:: state -> :cover:`~lang/types Long`
+
+.. var:: __STATE -> :cover:`~lang/types LLong`
+
View
7 source/sdk/native/win32/errors.rst
@@ -0,0 +1,7 @@
+native/win32/errors
+===================
+
+.. module:: native/win32/errors
+
+.. function:: GetLastError -> :cover:`~lang/types Int`
+
View
25 source/sdk/native/win32/types.rst
@@ -0,0 +1,25 @@
+native/win32/types
+==================
+
+.. module:: native/win32/types
+
+.. function:: toLLong~twoPartsLargeInteger (lowPart, highPart: :cover:`~lang/types Long` ) -> :cover:`~lang/types LLong`
+
+.. function:: toULLong~twoPartsLargeInteger (lowPart, highPart: :cover:`~lang/types Long` ) -> :cover:`~lang/types ULLong`
+
+.. function:: toTimestamp~fromFiletime (fileTime: :cover:`~native/win32/types FileTime` ) -> :cover:`~lang/types Long`
+
+.. cover:: Handle
+
+ :from: ``HANDLE``
+.. cover:: LargeInteger
+
+ :from: ``LARGE_INTEGER``
+.. cover:: ULargeInteger
+
+ :from: ``ULARGE_INTEGER``
+.. cover:: FileTime
+
+ :from: ``FILETIME``
+.. var:: INVALID_HANDLE_VALUE -> :cover:`~native/win32/types Handle`
+
View
312 source/sdk/net/Address.rst
@@ -0,0 +1,312 @@
+net/Address
+===========
+
+.. module:: net/Address
+
+.. class:: IPAddress
+
+ :extends: :class:`~lang/types Object`
+ .. method:: isBroadcast -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a broadcast address.
+
+ Only IPv4 addresses can be broadcast addresses. All bits are one.
+ IPv6 addresses always return false.
+
+
+ .. method:: isWildcard -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a wildcard (all zeros) address.
+
+
+ .. method:: isGlobalMulticast -> :cover:`~lang/types Bool`
+
+ Return true if the address is a global multicast address.
+
+ IPv4 most be in the 224.0.1.0 to 238.255.255.255 range.
+ IPv6 most be in the FFxF:x:x:x:x:x:x:x range.
+
+
+ .. method:: isIP4Compatible -> :cover:`~lang/types Bool`
+
+ Returns true if the address is IPv4 compatible.
+
+ IPv4 addresses always return true.
+ IPv6 address must be in the ::x:x range (first 96 bits are zero).
+
+
+ .. method:: isIP4Mapped -> :cover:`~lang/types Bool`
+
+ Returns true if the address is an IPv4 mapped IPv6 address.
+
+ IPv4 addresses always return true.
+ IPv6 addresses must be in the ::FFFF:x:x range.
+
+
+ .. method:: isLinkLocal -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a link local unicast address.
+
+ IPv4 addresses are in the 169.254.0.0/16 range (RFC 3927).
+ IPv6 addresses have 1111 1110 10 as the first 10 bits, followed by 54 zeros.
+
+
+ .. method:: isLinkLocalMulticast -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a link local multicast address.
+
+ IPv4 addresses are in the 224.0.0.0/24 range. Note that this overlaps with the range for
+ well-known multicast addresses.
+
+
+ .. method:: isLoopback -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a loopback address.
+
+ IPv4 address must be 127.0.0.1
+ IPv6 address must be ::1
+
+
+ .. method:: isMulticast -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a multicast address.
+
+ IPv4 addresses must be in the 224.0.0.0 to 239.255.255.255 range
+ (the first four bits have the value 1110).
+ IPv6 addresses are in the FFxx:x:x:x:x:x:x:x range.
+
+
+ .. method:: isNodeLocalMulticast -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a node-local multicast address.
+
+ IPv4 does not support node-local multicast and will always return false.
+ IPv6 addresses must be in the FFx1:x:x:x:x:x:x:x range.
+
+
+ .. method:: isOrgLocalMulticast -> :cover:`~lang/types Bool`
+
+ Returns true if the address is an organization-local multicast address.
+
+ IPv4 addresses must be in the 239.192.0.0/16 range.
+ IPv6 addresses must be in the FFx8:x:x:x:x:x:x:x range.
+
+
+ .. method:: isSiteLocal -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a site-local unicast address.
+
+ IPv4 addresses are in on of the 10.0.0.0/24, 192.168.0.0/16 or 172.16.0.0 to 172.31.255.255 ranges.
+ IPv6 addresses have 1111 1110 11 as the first 10 bits, followed by 38 zeros.
+
+
+ .. method:: isSiteLocalMulticast -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a site-local multicast address.
+
+ IPv4 addresses are in the 239.255.0.0/16 range.
+ IPv6 addresses are in the FFx5:x:x:x:x:x:x:x range.
+
+
+ .. method:: isUnicast -> :cover:`~lang/types Bool`
+
+ Returns true if the address is an unicast address.
+
+ An address is unicast if it is neither a wildcard, broadcast, or multicast.
+
+
+ .. method:: isWellKnownMulticast -> :cover:`~lang/types Bool`
+
+ Returns true if the address is a well-known multicast address.
+
+ IPv4 addresses are in the 224.0.0.0/8 range.
+ IPv6 addresses are in the FF0x:x:x:x:x:x:x:x range.
+
+
+ .. method:: mask (mask: :class:`~net/Address IPAddress` )
+
+ Masks the IP address using the given netmask, which is usually a IPv4 subnet mask.
+ Only supported for IPv4 addresses.
+ The new address is (address & mask).
+
+
+ .. method:: mask~withSet (mask, set: :class:`~net/Address IPAddress` )
+
+ Masks the IP address using the given netmask, which is usually a IPv4 subnet mask.
+ Only supported for IPv4 addresses.
+
+ The new address is (address & mask) | (set & mask).
+
+
+ .. method:: toString -> :cover:`~lang/types String`
+
+ Returns a string representation of the address in presentation format.
+
+
+ .. field:: family -> :cover:`~lang/types Int`
+
+.. class:: IP4Address
+
+ :extends: :class:`~net/Address IPAddress`
+ .. staticmethod:: new (ipAddress: :cover:`~lang/types String` ) -> :class:`~net/Address IP4Address`
+
+ .. method:: init (ipAddress: :cover:`~lang/types String` )
+
+ .. staticmethod:: new~wildcard -> :class:`~net/Address IP4Address`
+
+ .. method:: init~wildcard
+
+ .. staticmethod:: new~withAddr (addr: :cover:`~net/berkeley InAddr` ) -> :class:`~net/Address IP4Address`
+
+ .. method:: init~withAddr (addr: :cover:`~net/berkeley InAddr` )
+
+ .. method:: isBroadcast -> :cover:`~lang/types Bool`
+
+ .. method:: isWildcard -> :cover:`~lang/types Bool`
+
+ .. method:: isGlobalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isIP4Compatible -> :cover:`~lang/types Bool`
+
+ .. method:: isIP4Mapped -> :cover:`~lang/types Bool`
+
+ .. method:: isLinkLocal -> :cover:`~lang/types Bool`
+
+ .. method:: isLinkLocalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isLoopback -> :cover:`~lang/types Bool`
+
+ .. method:: isMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isNodeLocalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isOrgLocalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isSiteLocal -> :cover:`~lang/types Bool`
+
+ .. method:: isSiteLocalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isWellKnownMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: mask (mask: :class:`~net/Address IPAddress` )
+
+ .. method:: mask~withSet (mask, set: :class:`~net/Address IPAddress` )
+
+ .. method:: toString -> :cover:`~lang/types String`
+
+ .. field:: ai -> :cover:`~net/berkeley InAddr`
+
+.. class:: IP6Address
+
+ :extends: :class:`~net/Address IPAddress`
+ .. staticmethod:: new (ipAddress: :cover:`~lang/types String` ) -> :class:`~net/Address IP6Address`
+
+ .. method:: init (ipAddress: :cover:`~lang/types String` )
+
+ .. staticmethod:: new~withAddr (addr: :cover:`~net/berkeley In6Addr` ) -> :class:`~net/Address IP6Address`
+
+ .. method:: init~withAddr (addr: :cover:`~net/berkeley In6Addr` )
+
+ .. method:: toWords -> :cover:`~lang/types UInt16` *
+
+ .. method:: isBroadcast -> :cover:`~lang/types Bool`
+
+ .. method:: isWildcard -> :cover:`~lang/types Bool`
+
+ .. method:: isGlobalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isIP4Compatible -> :cover:`~lang/types Bool`
+
+ .. method:: isIP4Mapped -> :cover:`~lang/types Bool`
+
+ .. method:: isLinkLocal -> :cover:`~lang/types Bool`
+
+ .. method:: isLinkLocalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isLoopback -> :cover:`~lang/types Bool`
+
+ .. method:: isMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isNodeLocalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isOrgLocalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isSiteLocal -> :cover:`~lang/types Bool`
+
+ .. method:: isSiteLocalMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: isWellKnownMulticast -> :cover:`~lang/types Bool`
+
+ .. method:: mask (mask: :class:`~net/Address IPAddress` )
+
+ .. method:: mask~withSet (mask, set: :class:`~net/Address IPAddress` )
+
+ .. method:: toString -> :cover:`~lang/types String`
+
+ .. field:: ai -> :cover:`~net/berkeley In6Addr`
+
+.. class:: SocketAddress
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new (host: :class:`~net/Address IPAddress` , port: :cover:`~lang/types Int` ) -> :class:`~net/Address SocketAddress`
+
+ .. staticmethod:: newFromSock (addr: :cover:`~net/berkeley SockAddr` *, len: :cover:`~lang/types UInt` ) -> :class:`~net/Address SocketAddress`
+
+ .. method:: family -> :cover:`~lang/types Int`
+
+ .. method:: host -> :class:`~net/Address IPAddress`
+
+ .. method:: port -> :cover:`~lang/types Int`
+
+ .. method:: addr -> :cover:`~net/berkeley SockAddr` *
+
+ .. method:: length -> :cover:`~lang/types UInt32`
+
+ .. method:: toString -> :cover:`~lang/types String`
+
+.. class:: SocketAddressIP4
+
+ :extends: :class:`~net/Address SocketAddress`
+ .. staticmethod:: new (addr: :cover:`~net/berkeley InAddr` , port: :cover:`~lang/types Int` ) -> :class:`~net/Address SocketAddressIP4`
+
+ .. method:: init (addr: :cover:`~net/berkeley InAddr` , port: :cover:`~lang/types Int` )
+
+ .. staticmethod:: new~sock (sockAddr: :cover:`~net/berkeley SockAddrIn` *) -> :class:`~net/Address SocketAddressIP4`
+
+ .. method:: init~sock (sockAddr: :cover:`~net/berkeley SockAddrIn` *)
+
+ .. method:: family -> :cover:`~lang/types Int`
+
+ .. method:: host -> :class:`~net/Address IPAddress`
+
+ .. method:: port -> :cover:`~lang/types Int`
+
+ .. method:: addr -> :cover:`~net/berkeley SockAddr` *
+
+ .. method:: length -> :cover:`~lang/types UInt32`
+
+ .. field:: sa -> :cover:`~net/berkeley SockAddrIn`
+
+.. class:: SocketAddressIP6
+
+ :extends: :class:`~net/Address SocketAddress`
+ .. staticmethod:: new (addr: :cover:`~net/berkeley In6Addr` , port: :cover:`~lang/types Int` ) -> :class:`~net/Address SocketAddressIP6`
+
+ .. method:: init (addr: :cover:`~net/berkeley In6Addr` , port: :cover:`~lang/types Int` )
+
+ .. staticmethod:: new~sock6 (sockAddr: :cover:`~net/berkeley SockAddrIn6` *) -> :class:`~net/Address SocketAddressIP6`
+
+ .. method:: init~sock6 (sockAddr: :cover:`~net/berkeley SockAddrIn6` *)
+
+ .. method:: family -> :cover:`~lang/types Int`
+
+ .. method:: host -> :class:`~net/Address IPAddress`
+
+ .. method:: port -> :cover:`~lang/types Int`
+
+ .. method:: addr -> :cover:`~net/berkeley SockAddr` *
+
+ .. method:: length -> :cover:`~lang/types UInt32`
+
+ .. field:: sa -> :cover:`~net/berkeley SockAddrIn6`
+
View
62 source/sdk/net/DNS.rst
@@ -0,0 +1,62 @@
+net/DNS
+=======
+
+.. module:: net/DNS
+
+.. class:: DNS
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new -> :class:`~net/DNS DNS`
+
+ .. method:: init
+
+ .. staticmethod:: resolve (hostname: :cover:`~lang/types String` ) -> :class:`~net/DNS HostInfo`
+
+ Perform DNS lookup using the hostname.
+ Returns information about the host that was found.
+
+
+ .. staticmethod:: resolve~filter (hostname: :cover:`~lang/types String` , socketType, socketFamily: :cover:`~lang/types Int` ) -> :class:`~net/DNS HostInfo`
+
+ .. staticmethod:: resolveOne (host: :cover:`~lang/types String` ) -> :class:`~net/Address IPAddress`
+
+ Perform DNS lookup using the hostname.
+ Returns the first IPAddress found for the host.
+
+
+ .. staticmethod:: resolveOne~filter (host: :cover:`~lang/types String` , socketType, socketFamily: :cover:`~lang/types Int` ) -> :class:`~net/Address IPAddress`
+
+ .. staticmethod:: reverse (ip: :class:`~net/Address IPAddress` ) -> :cover:`~lang/types String`
+
+ Perform a reverse DNS lookup by using the host's address.
+ Returns the hostname of the specified address.
+
+
+ .. staticmethod:: reverse~withSockAddr (sockaddr: :class:`~net/Address SocketAddress` ) -> :cover:`~lang/types String`
+
+ .. staticmethod:: hostname -> :cover:`~lang/types String`
+
+ Returns the hostname of this system.
+
+
+ .. staticmethod:: localhost -> :class:`~net/DNS HostInfo`
+
+ Retreive host information about this system.
+
+
+.. class:: HostInfo
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new (addrinfo: :cover:`~net/berkeley AddrInfo` *) -> :class:`~net/DNS HostInfo`
+
+ .. method:: init (addrinfo: :cover:`~net/berkeley AddrInfo` *)
+
+ .. method:: addresses -> :class:`~structs/LinkedList LinkedList<T>`
+
+ Returns a list of IPAddress associated with this host.
+
+
+ .. field:: name -> :cover:`~lang/types String`
+
+ .. field:: addresses -> :class:`~structs/LinkedList LinkedList<T>`
+
View
12 source/sdk/net/DatagramSocket.rst
@@ -0,0 +1,12 @@
+net/DatagramSocket
+==================
+
+.. module:: net/DatagramSocket
+
+.. class:: DatagramSocket
+
+ :extends: :class:`~net/Socket Socket`
+ .. staticmethod:: new -> :class:`~net/DatagramSocket DatagramSocket`
+
+ .. method:: init
+
View
37 source/sdk/net/Exceptions.rst
@@ -0,0 +1,37 @@
+net/Exceptions
+==============
+
+.. module:: net/Exceptions
+
+.. function:: strerror (:cover:`~lang/types Int` ) -> :cover:`~lang/types String`
+
+.. class:: NetError
+
+ :extends: :class:`~lang/types Exception`
+ .. staticmethod:: new -> :class:`~net/Exceptions NetError`
+
+ .. method:: init
+
+.. class:: InvalidAddress
+
+ :extends: :class:`~net/Exceptions NetError`
+ .. staticmethod:: new -> :class:`~net/Exceptions InvalidAddress`
+
+ .. method:: init
+
+.. class:: DNSError
+
+ :extends: :class:`~net/Exceptions NetError`
+ .. staticmethod:: new -> :class:`~net/Exceptions DNSError`
+
+ .. method:: init
+
+.. class:: SocketError
+
+ :extends: :class:`~net/Exceptions NetError`
+ .. staticmethod:: new -> :class:`~net/Exceptions SocketError`
+
+ .. method:: init
+
+.. var:: errno -> :cover:`~lang/types Int`
+
View
35 source/sdk/net/ServerSocket.rst
@@ -0,0 +1,35 @@
+net/ServerSocket
+================
+
+.. module:: net/ServerSocket
+
+.. class:: ServerSocket
+
+ :extends: :class:`~net/Socket Socket`
+ .. staticmethod:: new -> :class:`~net/ServerSocket ServerSocket`
+
+ .. method:: init
+
+ .. method:: bind (port: :cover:`~lang/types Int` )
+
+ Bind a local port to the socket.
+
+
+ .. method:: bind~withAddr (addr: :class:`~net/Address SocketAddress` )
+
+ Bind a local address to the socket.
+
+
+ .. method:: listen (backlog: :cover:`~lang/types Int` )
+
+ Places the socket into a listening state.
+
+
+ .. method:: accept -> :class:`~net/StreamSocket StreamSocket`
+
+ Accept an incoming connection and returns it.
+
+ This method will normally block if no connection is
+ available immediately.
+
+
View
36 source/sdk/net/Socket.rst
@@ -0,0 +1,36 @@
+net/Socket
+==========
+
+.. module:: net/Socket
+
+.. class:: Socket
+
+ :extends: :class:`~lang/types Object`
+ .. staticmethod:: new~sock (family, type, protocol: :cover:`~lang/types Int` ) -> :class:`~net/Socket Socket`
+
+ .. method:: init~sock (family, type, protocol: :cover:`~lang/types Int` )
+
+ .. staticmethod:: new~descriptor (family, type, protocol, descriptor: :cover:`~lang/types Int` ) -> :class:`~net/Socket Socket`
+
+ .. method:: init~descriptor (family, type, protocol, descriptor: :cover:`~lang/types Int` )
+
+ .. method:: close
+
+ .. method:: ioctl (request: :cover:`~lang/types Int` , arg: :cover:`~lang/types Pointer` )
+
+ .. method:: available -> :cover:`~lang/types Int`
+
+ .. field:: descriptor -> :cover:`~lang/types Int`
+
+ .. field:: family -> :cover:`~lang/types Int`
+
+ .. field:: type -> :cover:`~lang/types Int`
+
+ .. field:: protocol -> :cover:`~lang/types Int`
+
+.. cover:: SocketFamily
+
+.. cover:: SocketType
+
+.. cover:: SocketMsgFlags
+
View
86 source/sdk/net/StreamSocket.rst
@@ -0,0 +1,86 @@
+net/StreamSocket
+================
+
+.. module:: net/StreamSocket
+
+.. class:: StreamSocket
+
+ :extends: :class:`~net/Socket Socket`
+ .. staticmethod:: new~addr (remote: :class:`~net/Address SocketAddress` ) -> :class:`~net/StreamSocket StreamSocket`
+
+ .. method:: init~addr (remote: :class:`~net/Address SocketAddress` )
+
+ .. staticmethod:: new~addrDescriptor (remote: :class:`~net/Address SocketAddress` , descriptor: :cover:`~lang/types Int` ) -> :class:`~net/StreamSocket StreamSocket`
+
+ .. method:: init~addrDescriptor (remote: :class:`~net/Address SocketAddress` , descriptor: :cover:`~lang/types Int` )
+
+ .. staticmethod:: new~hostAndPort (host: :cover:`~lang/types String` , port: :cover:`~lang/types Int` ) -> :class:`~net/StreamSocket StreamSocket`
+
+ .. method:: init~hostAndPort (host: :cover:`~lang/types String` , port: :cover:`~lang/types Int` )
+
+ .. staticmethod:: new~family (host: :cover:`~lang/types String` , port, family: :cover:`~lang/types Int` ) -> :class:`~net/StreamSocket StreamSocket`
+
+ .. method:: init~family (host: :cover:`~lang/types String` , port, family: :cover:`~lang/types Int` )
+
+ .. method:: connect
+
+ .. method:: reader -> :class:`~net/StreamSocket StreamSocketReader`
+
+ .. method:: writer -> :class:`~net/StreamSocket StreamSocketWriter`
+
+ .. method:: send~withLength (data: :cover:`~lang/types String` , length: :cover:`~lang/types SizeT` , flags: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ .. method:: send~withFlags (data: :cover:`~lang/types String` , flags: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ .. method:: send (data: :cover:`~lang/types String` ) -> :cover:`~lang/types Int`
+
+ .. method:: sendByte~withFlags (byte: :cover:`~lang/types Char` , flags: :cover:`~lang/types Int` )
+
+ .. method:: sendByte (byte: :cover:`~lang/types Char` )
+
+ .. method:: receive~withFlags (buffer: :cover:`~lang/types String` , length: :cover:`~lang/types SizeT` , flags: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+ .. method:: receive (buffer: :cover:`~lang/types String` , length: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Int`
+
+ .. method:: receiveByte~withFlags (flags: :cover:`~lang/types Int` ) -> :cover:`~lang/types Char`
+
+ .. method:: receiveByte -> :cover:`~lang/types Char`
+
+ .. field:: remote -> :class:`~net/Address SocketAddress`
+
+.. class:: StreamSocketReader
+
+ :extends: :class:`~io/Reader Reader`
+ .. staticmethod:: new (source: :class:`~net/StreamSocket StreamSocket` ) -> :class:`~net/StreamSocket StreamSocketReader`
+
+ .. method:: init (source: :class:`~net/StreamSocket StreamSocket` )
+
+ .. method:: read (chars: :cover:`~lang/types String` , offset, count: :cover:`~lang/types Int` ) -> :cover:`~lang/types SizeT`
+
+ .. method:: read~char -> :cover:`~lang/types Char`
+
+ .. method:: hasNext -> :cover:`~lang/types Bool`
+
+ .. method:: rewind (offset: :cover:`~lang/types Int` )
+
+ .. method:: mark -> :cover:`~lang/types Long`
+
+ .. method:: reset (marker: :cover:`~lang/types Long` )
+
+ .. field:: source -> :class:`~net/StreamSocket StreamSocket`
+
+.. class:: StreamSocketWriter
+
+ :extends: :class:`~io/Writer Writer`
+ .. staticmethod:: new (dest: :class:`~net/StreamSocket StreamSocket` ) -> :class:`~net/StreamSocket StreamSocketWriter`
+
+ .. method:: init (dest: :class:`~net/StreamSocket StreamSocket` )
+
+ .. method:: close
+
+ .. method:: write~chr (chr: :cover:`~lang/types Char` )
+
+ .. method:: write (chars: :cover:`~lang/types String` , length: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types SizeT`
+
+ .. field:: dest -> :class:`~net/StreamSocket StreamSocket`
+
View
125 source/sdk/net/berkeley.rst
@@ -0,0 +1,125 @@
+net/berkeley
+============
+
+.. module:: net/berkeley
+
+.. function:: socket (family, type, protocol: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: accept (s: :cover:`~lang/types Int` , addr: :cover:`~net/berkeley SockAddr` *, addrlen: :cover:`~lang/types UInt` ) -> :cover:`~lang/types Int`
+
+.. function:: bind (sockfd: :cover:`~lang/types Int` , my_addr: :cover:`~net/berkeley SockAddr` *, addrlen: :cover:`~lang/types UInt` ) -> :cover:`~lang/types Int`
+
+.. function:: connect (sockfd: :cover:`~lang/types Int` , serv_addr: :cover:`~net/berkeley SockAddr` *, addrlen: :cover:`~lang/types UInt` ) -> :cover:`~lang/types Int`
+
+.. function:: close (descriptor: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: shutdown (s, how: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: listen (s, backlog: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: poll (ufds: :cover:`~net/berkeley PollFd` *, nfds: :cover:`~lang/types UInt` , timeout: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: recv (s: :cover:`~lang/types Int` , buf: :cover:`~lang/types Pointer` , len: :cover:`~lang/types SizeT` , flags: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: recvFrom (s: :cover:`~lang/types Int` , buf: :cover:`~lang/types Pointer` , len: :cover:`~lang/types SizeT` , flags: :cover:`~lang/types Int` , s_from: :cover:`~net/berkeley SockAddr` *, fromlen: :cover:`~lang/types UInt` ) -> :cover:`~lang/types Int`
+
+.. function:: send (s: :cover:`~lang/types Int` , buf: :cover:`~lang/types Pointer` , len: :cover:`~lang/types SizeT` , flags: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: sendTo (s: :cover:`~lang/types Int` , buf: :cover:`~lang/types Pointer` , len: :cover:`~lang/types SizeT` , flags: :cover:`~lang/types Int` , s_to: :cover:`~net/berkeley SockAddr` *, tolen: :cover:`~lang/types UInt` ) -> :cover:`~lang/types Int`
+
+.. function:: select (n: :cover:`~lang/types Int` , readfds: :cover:`~net/berkeley FdSet` *, writefds: :cover:`~net/berkeley FdSet` , exceptfds: :cover:`~net/berkeley FdSet` *, timeout: :cover:`~net/berkeley TimeVal` *) -> :cover:`~lang/types Int`
+
+.. function:: getsockopt (s, level, optname: :cover:`~lang/types Int` , optval: :cover:`~lang/types Pointer` , optlen: :cover:`~lang/types UInt` ) -> :cover:`~lang/types Int`
+
+.. function:: setsockopt (s, level, optname: :cover:`~lang/types Int` , optval: :cover:`~lang/types Pointer` , optlen: :cover:`~lang/types UInt` ) -> :cover:`~lang/types Int`
+
+.. function:: getaddrinfo (nodename, servname: :cover:`~lang/types String` , hints: :cover:`~net/berkeley AddrInfo` *, servinfo: :cover:`~net/berkeley AddrInfo` **) -> :cover:`~lang/types Int`
+
+.. function:: getnameinfo (sa: :cover:`~net/berkeley SockAddr` *, salen: :cover:`~lang/types UInt32` , host: :cover:`~lang/types String` , hostlen: :cover:`~lang/types SizeT` , serv: :cover:`~lang/types String` , servlen: :cover:`~lang/types UInt32` , flags: :cover:`~lang/types Int` ) -> :cover:`~lang/types Int`
+
+.. function:: freeaddrinfo (ai: :cover:`~net/berkeley AddrInfo` *)
+
+.. function:: gai_strerror (ecode: :cover:`~lang/types Int` ) -> :cover:`~lang/types Char` *
+
+.. function:: gethostname (name: :cover:`~lang/types String` , len: :cover:`~lang/types SizeT` ) -> :cover:`~lang/types Int`