Backend/Database/Serializable.cpp
/*!
 * @brief deserialize content
 * @details deserialize the current item's contents from the serial.
 *
 * The inbound data stream should look like:
 * contents|(rest of items)
 *
 * afterwards, it should look like:
 * (rest of items)
 *
 * The process goes as follows:
 * - extract the contents from the full data
 * - ensure all characters in contents are escaped. If not, escape them.
 * - shift the rest of the contents in the data over to clear the just-extracted contents.
 *
 * @param serialRef a pointer to the serial to deserialize
 * @param len length of the serial (pass by reference)
 * @param newBlockSize block size for the current item (pass by reference)
 * @param newSize the expected size for the contents
 * @param delimiterLen the length of the ending delimiter (1 = |, 2 = \\|)
 * @return the contents of the item currently being extracted
 */
@brief deserialize content
@details deserialize the current item's contents from the serial.

The inbound data stream should look like:
contents|(rest of items)

afterwards, it should look like:
(rest of items)

The process goes as follows:
- extract the contents from the full data
- ensure all characters in contents are escaped. If not, escape them.
- shift the rest of the contents in the data over to clear the just-extracted contents.


@brief deserialize content @details deserialize the current item ' s contents from the serial . The inbound data stream should look like : contents| ( rest of items ) afterwards it should look like : ( rest of items ) The process goes as follows : - extract the contents from the full data - ensure all characters in contents are escaped . If not escape them . - shift the rest of the contents in the data over to clear the just - extracted contents .
GString Serializable::deserializeContent(const GString& serial)
{
	GString newSerial = serial;
	for (unsigned int j = 0; j < newSerial.length(); ++j)
	{
		if(newSerial[j] != ESC_CHAR)
			continue;
		newSerial = newSerial.substr(0, j) + newSerial.substr(j+1);
	}
	return newSerial;
}
GString Serializable :: deserializeContent ( const GString & serial ) { GString newSerial = serial ; for ( unsigned int j = 0 ; j < newSerial . length ( ) ; ++ j ) { if ( newSerial [ j ] != ESC_CHAR ) continue ; newSerial = newSerial . substr ( 0 , j ) + newSerial . substr ( j + 1 ) ; } return newSerial ; }
@brief deserialize content
 @details deserialize the current item's contents from the serial.
@brief deserialize content @details deserialize the current item ' s contents from the serial .
// escape all characters //Cut out the escape character