Skip to content

Commit 7410a29

Browse files
committed
Serialization: fwd declaring serialize so windows stops complaining
1 parent bc178ff commit 7410a29

File tree

13 files changed

+162
-1
lines changed

13 files changed

+162
-1
lines changed

include/hpp/fcl/BV/AABB.h

+7
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,13 @@ class HPP_FCL_DLLAPI AABB
222222
}
223223

224224
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
225+
226+
private:
227+
template <class Archive>
228+
void serialize(Archive& ar, const unsigned int version);
229+
230+
public:
231+
friend class boost::serialization::access;
225232
};
226233

227234
/// @brief translate the center of AABB by t

include/hpp/fcl/BV/OBB.h

+7
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ struct HPP_FCL_DLLAPI OBB
125125

126126
/// @brief Volume of the OBB
127127
inline FCL_REAL volume() const { return width() * height() * depth(); }
128+
129+
private:
130+
template <class Archive>
131+
void serialize(Archive& ar, const unsigned int version);
132+
133+
public:
134+
friend class boost::serialization::access;
128135
};
129136

130137
/// @brief Translate the OBB bv

include/hpp/fcl/BV/OBBRSS.h

+7
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,13 @@ struct HPP_FCL_DLLAPI OBBRSS
129129

130130
/// @brief Volume of the OBBRSS
131131
inline FCL_REAL volume() const { return obb.volume(); }
132+
133+
private:
134+
template <class Archive>
135+
void serialize(Archive& ar, const unsigned int version);
136+
137+
public:
138+
friend class boost::serialization::access;
132139
};
133140

134141
/// @brief Check collision between two OBBRSS, b1 is in configuration (R0, T0)

include/hpp/fcl/BV/RSS.h

+7
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ struct HPP_FCL_DLLAPI RSS
149149
bool overlap(const RSS& other, RSS& /*overlap_part*/) const {
150150
return overlap(other);
151151
}
152+
153+
private:
154+
template <class Archive>
155+
void serialize(Archive& ar, const unsigned int version);
156+
157+
public:
158+
friend class boost::serialization::access;
152159
};
153160

154161
/// @brief distance between two RSS bounding volumes

include/hpp/fcl/BV/kDOP.h

+7
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ class HPP_FCL_DLLAPI KDOP
169169

170170
//// @brief Check whether one point is inside the KDOP
171171
bool inside(const Vec3f& p) const;
172+
173+
private:
174+
template <class Archive>
175+
void serialize(Archive& ar, const unsigned int version);
176+
177+
public:
178+
friend class boost::serialization::access;
172179
};
173180

174181
template <short N>

include/hpp/fcl/BV/kIOS.h

+7
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ class HPP_FCL_DLLAPI kIOS
164164

165165
/// @brief Volume of the kIOS
166166
FCL_REAL volume() const;
167+
168+
private:
169+
template <class Archive>
170+
void serialize(Archive& ar, const unsigned int version);
171+
172+
public:
173+
friend class boost::serialization::access;
167174
};
168175

169176
/// @brief Translate the kIOS BV

include/hpp/fcl/BVH/BVH_model.h

+7
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,13 @@ class HPP_FCL_DLLAPI BVHModel
496496

497497
return true;
498498
}
499+
500+
private:
501+
template <class Archive>
502+
void serialize(Archive& ar, const unsigned int version);
503+
504+
public:
505+
friend class boost::serialization::access;
499506
};
500507

501508
/// @}

include/hpp/fcl/collision_data.h

+28
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,13 @@ struct HPP_FCL_DLLAPI CollisionRequest
377377
distance_upper_bound == other.distance_upper_bound;
378378
HPP_FCL_COMPILER_DIAGNOSTIC_POP
379379
}
380+
381+
private:
382+
template <class Archive>
383+
void serialize(Archive& ar, const unsigned int version);
384+
385+
public:
386+
friend class boost::serialization::access;
380387
};
381388

382389
inline FCL_REAL Contact::getDistanceToCollision(
@@ -490,6 +497,13 @@ struct HPP_FCL_DLLAPI CollisionResult
490497
/// @brief reposition Contact objects when fcl inverts them
491498
/// during their construction.
492499
void swapObjects();
500+
501+
private:
502+
template <class Archive>
503+
void serialize(Archive& ar, const unsigned int version);
504+
505+
public:
506+
friend class boost::serialization::access;
493507
};
494508

495509
struct DistanceResult;
@@ -560,6 +574,13 @@ struct HPP_FCL_DLLAPI DistanceRequest
560574
rel_err == other.rel_err && abs_err == other.abs_err;
561575
HPP_FCL_COMPILER_DIAGNOSTIC_POP
562576
}
577+
578+
private:
579+
template <class Archive>
580+
void serialize(Archive& ar, const unsigned int version);
581+
582+
public:
583+
friend class boost::serialization::access;
563584
};
564585

565586
/// @brief distance result
@@ -684,6 +705,13 @@ struct HPP_FCL_DLLAPI DistanceResult
684705

685706
return is_same;
686707
}
708+
709+
private:
710+
template <class Archive>
711+
void serialize(Archive& ar, const unsigned int version);
712+
713+
public:
714+
friend class boost::serialization::access;
687715
};
688716

689717
namespace internal {

include/hpp/fcl/hfield.h

+7
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,13 @@ class HPP_FCL_DLLAPI HeightField
511511
y_grid == other.y_grid && bvs == other.bvs &&
512512
num_bvs == other.num_bvs;
513513
}
514+
515+
private:
516+
template <class Archive>
517+
void serialize(Archive& ar, const unsigned int version);
518+
519+
public:
520+
friend class boost::serialization::access;
514521
};
515522

516523
/// @brief Specialization of getNodeType() for HeightField with different BV

include/hpp/fcl/math/transform.h

+7
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,13 @@ class HPP_FCL_DLLAPI Transform3f
205205
bool operator!=(const Transform3f& other) const { return !(*this == other); }
206206

207207
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
208+
209+
private:
210+
template <class Archive>
211+
void serialize(Archive& ar, const unsigned int version);
212+
213+
public:
214+
friend class boost::serialization::access;
208215
};
209216

210217
template <typename Derived>

include/hpp/fcl/serialization/serializable.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace fcl {
1515
namespace serialization {
1616

1717
template <class Derived>
18-
struct HPP_FCL_DLLAPI Serializable {
18+
struct Serializable {
1919
private:
2020
Derived& derived() { return *static_cast<Derived*>(this); }
2121
const Derived& derived() const { return *static_cast<const Derived*>(this); }

include/hpp/fcl/shape/convex.h

+7
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,13 @@ class Convex
106106

107107
protected:
108108
void fillNeighbors();
109+
110+
private:
111+
template <class Archive>
112+
void serialize(Archive& ar, const unsigned int version);
113+
114+
public:
115+
friend class boost::serialization::access;
109116
};
110117

111118
} // namespace fcl

include/hpp/fcl/shape/geometric_shapes.h

+63
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ class HPP_FCL_DLLAPI TriangleP
130130

131131
public:
132132
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
133+
134+
private:
135+
template <class Archive>
136+
void serialize(Archive& ar, const unsigned int version);
137+
138+
public:
139+
friend class boost::serialization::access;
133140
};
134141

135142
/// @brief Center at zero point, axis aligned box
@@ -202,6 +209,13 @@ class HPP_FCL_DLLAPI Box : public ShapeBase,
202209

203210
public:
204211
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
212+
213+
private:
214+
template <class Archive>
215+
void serialize(Archive& ar, const unsigned int version);
216+
217+
public:
218+
friend class boost::serialization::access;
205219
};
206220

207221
/// @brief Center at zero point sphere
@@ -266,6 +280,13 @@ class HPP_FCL_DLLAPI Sphere
266280

267281
public:
268282
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
283+
284+
private:
285+
template <class Archive>
286+
void serialize(Archive& ar, const unsigned int version);
287+
288+
public:
289+
friend class boost::serialization::access;
269290
};
270291

271292
/// @brief Ellipsoid centered at point zero
@@ -340,6 +361,13 @@ class HPP_FCL_DLLAPI Ellipsoid
340361

341362
public:
342363
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
364+
365+
private:
366+
template <class Archive>
367+
void serialize(Archive& ar, const unsigned int version);
368+
369+
public:
370+
friend class boost::serialization::access;
343371
};
344372

345373
/// @brief Capsule
@@ -424,6 +452,13 @@ class HPP_FCL_DLLAPI Capsule
424452

425453
public:
426454
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
455+
456+
private:
457+
template <class Archive>
458+
void serialize(Archive& ar, const unsigned int version);
459+
460+
public:
461+
friend class boost::serialization::access;
427462
};
428463

429464
/// @brief Cone
@@ -514,6 +549,13 @@ class HPP_FCL_DLLAPI Cone
514549

515550
public:
516551
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
552+
553+
private:
554+
template <class Archive>
555+
void serialize(Archive& ar, const unsigned int version);
556+
557+
public:
558+
friend class boost::serialization::access;
517559
};
518560

519561
/// @brief Cylinder along Z axis.
@@ -596,6 +638,13 @@ class HPP_FCL_DLLAPI Cylinder
596638

597639
public:
598640
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
641+
642+
private:
643+
template <class Archive>
644+
void serialize(Archive& ar, const unsigned int version);
645+
646+
public:
647+
friend class boost::serialization::access;
599648
};
600649

601650
/// @brief Base for convex polytope.
@@ -923,6 +972,13 @@ class HPP_FCL_DLLAPI Halfspace
923972

924973
public:
925974
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
975+
976+
private:
977+
template <class Archive>
978+
void serialize(Archive& ar, const unsigned int version);
979+
980+
public:
981+
friend class boost::serialization::access;
926982
};
927983

928984
/// @brief Infinite plane
@@ -986,6 +1042,13 @@ class HPP_FCL_DLLAPI Plane
9861042

9871043
public:
9881044
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
1045+
1046+
private:
1047+
template <class Archive>
1048+
void serialize(Archive& ar, const unsigned int version);
1049+
1050+
public:
1051+
friend class boost::serialization::access;
9891052
};
9901053

9911054
} // namespace fcl

0 commit comments

Comments
 (0)