Friday, July 13, 2018

Unpack

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

No comments:

Post a Comment

Configure the Firewall on the Enterprise Portal Server

After you install Enterprise Portal, enable Web Server (HTTP) in Windows Firewall. If you do not enable the web server in Windows Firewall...