46 #include <Xyce_config.h>
51 #include <N_PDS_Comm.h>
52 #include <N_ERH_ErrorMgr.h>
66 Pack<Device::Param>::packedByteCount(
67 const Device::Param & param)
70 int byteCount = Xyce::packedByteCount(static_cast<const Util::Param &>(param));
73 byteCount +=
sizeof(int);
89 Pack<Device::Param>::pack(
90 const Device::Param & param,
96 #ifdef Xyce_COUNT_PACKED_BYTES
97 int predictedPos = pos + Xyce::packedByteCount(param);
100 Xyce::pack(static_cast<const Util::Param &>(param), buf, bsize, pos, comm );
103 int dg = (param.isGiven_?1:0) + 2*(param.isDefault_ ? 1 : 0);
104 comm->pack( &dg, 1, buf, bsize, pos );
106 #ifdef Xyce_COUNT_PACKED_BYTES
107 if (pos != predictedPos)
109 DevelFatal(*
this,
"Param::pack") <<
"Predicted pos does not match actual pos";
124 Pack<Device::Param>::unpack(Device::Param ¶m,
char * pB,
int bsize,
int & pos, N_PDS_Comm * comm )
126 Xyce::unpack(static_cast<Util::Param &>(param), pB, bsize, pos, comm );
130 comm->unpack( pB, bsize, pos, &dg, 1 );
131 param.isGiven_ = ( dg%2 != 0 );
132 param.isDefault_ = ( dg >= 2 );
Pure virtual class to augment a linear system.