Add serializeOp() and serializeObject() methods to Prop struct
This commit is contained in:
parent
faefde1a4f
commit
6c1f2e4ded
@ -51,6 +51,27 @@ public:
|
||||
this->ntg == other.ntg;
|
||||
}
|
||||
|
||||
template<class Serializer>
|
||||
void serializeOp(Serializer& serializer)
|
||||
{
|
||||
serializer(this->permx);
|
||||
serializer(this->permy);
|
||||
serializer(this->permz);
|
||||
serializer(this->satnum);
|
||||
serializer(this->pvtnum);
|
||||
serializer(this->ntg);
|
||||
}
|
||||
|
||||
static Props serializeObject(){
|
||||
Props props;
|
||||
props.permx = 10.0;
|
||||
props.permy = 78.0;
|
||||
props.permz = 45.4;
|
||||
props.satnum = 3;
|
||||
props.pvtnum = 5;
|
||||
props.ntg = 45.1;
|
||||
return props;
|
||||
}
|
||||
};
|
||||
|
||||
std::optional<Props> props;
|
||||
|
Loading…
Reference in New Issue
Block a user