Skip to content

Commit

Permalink
fix contributor links and document more of datastream
Browse files Browse the repository at this point in the history
  • Loading branch information
samtupy committed May 1, 2024
1 parent 73e9013 commit 2f5a693
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/src/appendix/contributers.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributors
This file contains the names of anyone who has helped contribute to the NVGT engine in any significant way along with short descriptions of how these people have contributed. For a list of third party code used in the engine, you can view the Third Party Licenses topic. A huge thanks goes out to everyone listed here!

* (Patric W)[https://github.com/braillescreen]: some docs, build scripts, beta testing, and miscellaneous organization.
* (Quin G)[https://github.com/thequinbox]: responsible for a growing number of API references documentation topics, beta testing.
* [Patric W](https://github.com/braillescreen): some docs, build scripts, beta testing, and miscellaneous organization.
* [Quin G](https://github.com/thequinbox): responsible for a growing number of API references documentation topics, beta testing.
* Beta testers including but not limited to Patric Wilson, Quin G, Steven D, Lucas Brown, Liam Erven, DJWolfy, Lukáš Hosnedl, Heaven Games, Pragma and Day Garwood, without the valuable feedback and suggestions provided by these people NVGT would have never gotten this far.
* Last but not least, nothing is worth maintaining or developing without users, and so thank you to everyone who uses this engine and gives it their feedback, time and attention!
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# actives
This property will be true if a stream is opened and ready for use, false otherwise.

`const bool active;`

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
This property returns the number of bytes immedietly available to be read from a stream.
const int available;
## Remarks:
This property may not be implemented in all streams, for example decoders. If it is unavailable, it will return 0.
*/

// Example:
void main() {
datastream ds("example");
alert("example", ds.available); // Displays 7.
ds.read(2);
alert("example", ds.available); // Now shows 5, as 2 of the 7 bytes have been read.
}
14 changes: 14 additions & 0 deletions doc/src/references/builtin/classes/!streams/datastream/good.nvgt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
This property will be true when a datastream is ready to read or write, such as when the active property is true and the end of file has not been reached.
const bool good;
## Remarks:
This property is specifically true so long as the stream is opened and the eof, fail, and bad properties all return false.
*/

// Example:
void main() {
datastream ds("hello");
alert("example", ds.good); // Will display true because there is data to read.
ds.read();
alert("example", ds.good); // Will now display false because the end of file has been reached, ds.eof is true now.
}

0 comments on commit 2f5a693

Please sign in to comment.