Skip to content

Commit 7499a97

Browse files
committed
Updates function headers
1 parent 084c353 commit 7499a97

File tree

9 files changed

+42
-13
lines changed

9 files changed

+42
-13
lines changed

Elephant.yyp

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/ElephantDuplicate/ElephantDuplicate.gml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
/// @param target
1+
/// Makes an identical copy of the target. Unlike ElephantWrite(), this function ignores schemas and will copy
2+
/// all member variables and non-static methods. This function will recreate constructed structs appropriately
3+
/// and will also correctly duplicate circular references.
4+
///
5+
/// @return A copy of the target data
6+
///
7+
/// @param target Data to duplicate
28

39
function ElephantDuplicate(_target)
410
{

scripts/ElephantExportString/ElephantExportString.gml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
/// @param target
1+
/// As ElephantWrite(), but returns a base64-encoded string. This function also compresses the buffer.
2+
///
3+
/// @return base64-encoded string
4+
///
5+
/// @param target Data to serialize
26

37
function ElephantExportString(_target)
48
{

scripts/ElephantImportString/ElephantImportString.gml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
/// @param string
1+
/// As ElephantRead(), but takes a string rather than a buffer as input.
2+
///
3+
/// @return The data that was encoded
4+
///
5+
/// @param string base64-encoded string, as created by ElephantExportString()
26

37
function ElephantImportString(_string)
48
{

scripts/ElephantRead/ElephantRead.gml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
/// @param buffer
1+
/// Deserializes Elephant data from a buffer, starting at the buffer_tell() point. This function uses
2+
/// buffer_read() and will move the buffer head as it reads data. This function calls ELEPHANT_PRE_READ_METHOD
3+
/// and ELEPHANT_POST_READ_METHOD for constructed structs, and ELEPHANT_IS_DESERIALIZING is set to <true>.
4+
/// ELEPHANT_SCHEMA_VERSION will contain the constructor schema version that Elephant found in the source data.
5+
///
6+
/// @return The data that was encoded
7+
///
8+
/// @param buffer The buffer to read from
29

310
function ElephantRead(_buffer)
411
{

scripts/ElephantWrite/ElephantWrite.gml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
/// @param target
2-
/// @param [buffer]
1+
/// Serializes the given target data and writes it to the given buffer, starting at the buffer_tell() position.
2+
/// This function uses buffer_write() and will move the buffer head as it writes. If no buffer is provided then
3+
/// a new buffer is created that fits the serialized data. This function calls ELEPHANT_PRE_WRITE_METHOD and
4+
/// ELEPHANT_POST_WRITE_METHOD for constructed structs, and ELEPHANT_IS_DESERIALIZING is set to <false>.
5+
/// ELEPHANT_SCHEMA_VERSION will contain the constructor schema version that Elephant is using to serialize data.
6+
///
7+
/// @return Buffer, either the buffer passed into the function or a buffer the function created itself
8+
///
9+
/// @param target Data to serialize
10+
/// @param [buffer] Optional, the buffer to write to. If no buffer is provided then one is created automatically
311

412
function ElephantWrite()
513
{

scripts/__ElephantReadInner_1_0_0/__ElephantReadInner_1_0_0.yy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/__ElephantReadInner_1_1_0/__ElephantReadInner_1_1_0.yy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/__ElephantSystem/__ElephantSystem.yy

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)