/// management implementation. Derived classes would implement the
/// interface for specific memory-implementation behavior.
class ZoneTableSegment {
+protected:
+ /// \brief Protected constructor
+ ///
+ /// An instance implementing this interface is expected to be
+ /// created by the factory method (\c create()), so this constructor
+ /// is protected.
+ ZoneTableSegment()
+ {}
public:
/// \brief Destructor
virtual ~ZoneTableSegment() {}
/// MemorySegmentLocal based ZoneTableSegment. Please see the
/// ZoneTableSegment class documentation for usage.
class ZoneTableSegmentLocal : public ZoneTableSegment {
+ // This is so that ZoneTableSegmentLocal can be instantiated from
+ // ZoneTableSegment::create().
+ friend class ZoneTableSegment;
+protected:
+ /// \brief Protected constructor
+ ///
+ /// Instances are expected to be created by the factory method
+ /// (\c ZoneTableSegment::create()), so this constructor is
+ /// protected.
+ ZoneTableSegmentLocal()
+ {}
public:
/// \brief Destructor
virtual ~ZoneTableSegmentLocal() {}