web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :

Unpack

Hossein.K Profile Picture Hossein.K 6,648
The unpack() method is the counterpart to the pack() method. It receives a
container as a parameter and restores the type specific variables of the class. The
method returns a Boolean with the value true if the information could be restored.
The
unpack() method handles the current version number as a minimum, which
is defined in the ClassDeclaration. You can select to support unpacking of older
versions by extending the switch statement.
The
unpack() method has the following content.


 1
2
3
4
5
6
7
8
9
10
11
12
13
14
public boolean unpack(container _packedClass)
{
Version version =
RunBase::getVersion(_packedClass);
switch (version)
{
case(#CurrentVersion) :
[version,#CurrentList] = _packedClass;
break;
default :
return false;
}
return true;
}

Best Regards,
Hossein Karimi

Comments

*This post is locked for comments