コード例 #1
0
ファイル: ChLimit.cpp プロジェクト: DavidHammen/chrono
void ChLinkLimit::StreamIN(ChStreamInBinary& mstream)
{
		// class version number 
	int version = mstream.VersionRead();

		// stream in all member data
	double dfoo;
	int ifoo;
	ChFunction* ffoo;
	mstream >> ifoo;		Set_active(ifoo);
	mstream >> ifoo;		Set_polar(ifoo);
	mstream >> ifoo;		Set_penalty(ifoo);
	mstream >> dfoo;		Set_min(dfoo);
	mstream >> dfoo;		Set_max(dfoo);
	mstream >> dfoo;		Set_minCushion(dfoo);
	mstream >> dfoo;		Set_maxCushion(dfoo);	
	mstream >> dfoo;		Set_minElastic(dfoo);
	mstream >> dfoo;		Set_maxElastic(dfoo);
	mstream >> dfoo;		Set_Kmin(dfoo);
	mstream >> dfoo;		Set_Kmax(dfoo);
	mstream >> dfoo;		Set_Rmin(dfoo);
	mstream >> dfoo;		Set_Rmax(dfoo);
	mstream.AbstractReadCreate(&ffoo);		SetPolar_Max(ffoo);
	mstream.AbstractReadCreate(&ffoo);		SetModul_Kmin(ffoo);
	mstream.AbstractReadCreate(&ffoo);		SetModul_Kmax(ffoo);
	mstream.AbstractReadCreate(&ffoo);		SetModul_Rmin(ffoo);
	mstream.AbstractReadCreate(&ffoo);		SetModul_Rmax(ffoo);
}
コード例 #2
0
void ChFunction_Operation::StreamIN(ChStreamInBinary& mstream)
{
		// class version number
	int version = mstream.VersionRead();
		// deserialize parent class too
	ChFunction::StreamIN(mstream);

		// stream in all member data
	mstream >> op_type;

	if (fa) delete fa; fa=NULL;
	mstream.AbstractReadCreate(&fa);
	if (fb) delete fb; fb=NULL;
	mstream.AbstractReadCreate(&fb);
}
コード例 #3
0
void ChFunction_Integrate::StreamIN(ChStreamInBinary& mstream)
{
		// class version number
	int version = mstream.VersionRead();
		// deserialize parent class too
	ChFunction::StreamIN(mstream);

		// stream in all member data
	int ifoo;
	double dfoo;
	mstream >> ifoo;			Set_order(ifoo);
	mstream >> dfoo;			Set_C_start(dfoo);
	mstream >> dfoo;			Set_x_start(dfoo);
	mstream >> dfoo;			Set_x_end(dfoo);
	mstream >> ifoo;			Set_num_samples(ifoo);
	if (fa) delete fa; fa=NULL;
	mstream.AbstractReadCreate(&fa);
}
コード例 #4
0
ファイル: ChFunction_Sequence.cpp プロジェクト: globus000/cew
void ChFseqNode::StreamIN(ChStreamInBinary& mstream)
{
		// class version number
	int version = mstream.VersionRead();

		// stream in all member data
	mstream >> this->duration;
	mstream >> this->weight;
	mstream >> this->t_start;
	mstream >> this->t_end;
	mstream >> this->Iy;
	mstream >> this->Iydt;
	mstream >> this->Iydtdt;
	mstream >> this->y_cont;
	mstream >> this->ydt_cont;
	mstream >> this->ydtdt_cont;

	ChFunction* fooshared;
	mstream.AbstractReadCreate(&fooshared);	 // instance new
	fx = ChSharedPtr<ChFunction>(fooshared); // swap old shared to new shared, may delete old
	//***TODO*** better direct management of shared pointers serialization
}