Skip to content

Commit

Permalink
Mark deprecated functions in eggShell api
Browse files Browse the repository at this point in the history
  • Loading branch information
rajsite committed Jun 29, 2018
1 parent 2be5809 commit 2ef6124
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions source/io/module_eggShell.js
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,7 @@
var vireoObjectPointer = Module._malloc(4);
var vireoTypePointer = Module._malloc(4);

// **DEPRECATED**
Module.eggShell.getNumericArray = publicAPI.eggShell.getNumericArray = function (vi, path) {
var eggShellResult = EggShell_GetPointer(Module.eggShell.v_userShell, vi, path, vireoObjectPointer, vireoTypePointer);

Expand Down Expand Up @@ -639,6 +640,7 @@
return convertFlatArraytoNArray(actualArray, arrayInfo.dimensionLengths);
};

// **DEPRECATED**
Module.eggShell.getArrayDimLength = publicAPI.eggShell.getArrayDimLength = function (vi, path, dim) {
return EggShell_GetArrayDimLength(Module.eggShell.v_userShell, vi, path, dim);
};
Expand Down Expand Up @@ -669,6 +671,7 @@
Module.stackRestore(stack);
};

// **DEPRECATED**
Module.eggShell.dataReadString = function (stringPointer) {
var begin = Data_GetStringBegin(stringPointer);
var length = Data_GetStringLength(stringPointer);
Expand All @@ -677,75 +680,89 @@
};

// Note this function is tied to the underlying buffer, a copy is not made
// **DEPRECATED**
Module.eggShell.dataReadStringAsArray_NoCopy = function (stringPointer) {
var begin = Data_GetStringBegin(stringPointer);
var length = Data_GetStringLength(stringPointer);
return Module.HEAPU8.subarray(begin, begin + length);
};

// Source should be a JS String
// **DEPRECATED**
Module.eggShell.dataWriteString = function (destination, source) {
var sourceLength = Module.lengthBytesUTF8(source);
Data_WriteString(Module.eggShell.v_userShell, destination, source, sourceLength);
};

// Source should be a JS array of numbers or a TypedArray of Uint8Array or Int8Array
// **DEPRECATED**
Module.eggShell.dataWriteStringFromArray = function (destination, source) {
var sourceHeapPointer = Module._malloc(source.length);
Module.writeArrayToMemory(source, sourceHeapPointer);
Module._Data_WriteString(Module.eggShell.v_userShell, destination, sourceHeapPointer, source.length);
Module._free(sourceHeapPointer);
};

// **DEPRECATED**
Module.eggShell.dataReadBoolean = function (booleanPointer) {
var numericValue = Data_ReadBoolean(booleanPointer);
return numericValue !== 0;
};

// **DEPRECATED**
Module.eggShell.dataReadInt8 = function (intPointer) {
var numericValue = Data_ReadInt8(intPointer);
return numericValue;
};

// **DEPRECATED**
Module.eggShell.dataReadInt16 = function (intPointer) {
var numericValue = Data_ReadInt16(intPointer);
return numericValue;
};

// **DEPRECATED**
Module.eggShell.dataReadInt32 = function (intPointer) {
var numericValue = Data_ReadInt32(intPointer);
return numericValue;
};

// **DEPRECATED**
Module.eggShell.dataReadUInt8 = function (intPointer) {
var numericValue = Data_ReadUInt8(intPointer);
return numericValue;
};

// **DEPRECATED**
Module.eggShell.dataReadUInt16 = function (intPointer) {
var numericValue = Data_ReadUInt16(intPointer);
return numericValue;
};

// **DEPRECATED**
Module.eggShell.dataReadUInt32 = function (intPointer) {
var numericValue = Data_ReadUInt32(intPointer);
return numericValue;
};

// **DEPRECATED**
Module.eggShell.dataReadSingle = function (singlePointer) {
var numericValue = Data_ReadSingle(singlePointer);
return numericValue;
};

// **DEPRECATED**
Module.eggShell.dataReadDouble = function (doublePointer) {
var numericValue = Data_ReadDouble(doublePointer);
return numericValue;
};

// **DEPRECATED**
Module.eggShell.dataReadTypedArray = function (arrayPointer) {
return Module.eggShell.dataReadNumericArrayAsTypedArray(arrayPointer).array;
};

// **DEPRECATED**
Module.eggShell.dataReadNumericArrayAsTypedArray = function (arrayPointer) {
var eggShellResult = Data_GetArrayMetadata(Module.eggShell.v_userShell, arrayPointer, arrayTypeNameDoublePointer, arrayRankPointer, arrayBeginPointer);

Expand Down Expand Up @@ -797,43 +814,53 @@
};
};

// **DEPRECATED**
Module.eggShell.dataWriteBoolean = function (booleanPointer, booleanValue) {
var numericValue = booleanValue ? 1 : 0;
Data_WriteBoolean(booleanPointer, numericValue);
};

// **DEPRECATED**
Module.eggShell.dataWriteInt8 = function (destination, value) {
Data_WriteInt8(destination, value);
};

// **DEPRECATED**
Module.eggShell.dataWriteInt16 = function (destination, value) {
Data_WriteInt16(destination, value);
};

// **DEPRECATED**
Module.eggShell.dataWriteInt32 = function (destination, value) {
Data_WriteInt32(destination, value);
};

// **DEPRECATED**
Module.eggShell.dataWriteUInt8 = function (destination, value) {
Data_WriteUInt8(destination, value);
};

// **DEPRECATED**
Module.eggShell.dataWriteUInt16 = function (destination, value) {
Data_WriteUInt16(destination, value);
};

// **DEPRECATED**
Module.eggShell.dataWriteUInt32 = function (destination, value) {
Data_WriteUInt32(destination, value);
};

// **DEPRECATED**
Module.eggShell.dataWriteSingle = function (destination, value) {
Data_WriteSingle(destination, value);
};

// **DEPRECATED**
Module.eggShell.dataWriteDouble = function (destination, value) {
Data_WriteDouble(destination, value);
};

// **DEPRECATED**
Module.eggShell.dataWriteTypedArray = function (destination, value) {
var int32Byte = 4;
var rank = 1;
Expand Down

0 comments on commit 2ef6124

Please sign in to comment.