In C++ a class containing only pure virtual methods denotes an interface.
Example:
// Define the Serializable interface.
class Serializable {
// virtual destructor is required if the object may
// be deleted through a pointer to Serializable
virtual ~Serializable() {}
virtual std::string serialize() const = 0;
};
// Implements the Serializable interface
class MyClass : public MyBaseClass, public virtual Serializable {
virtual std::string serialize() const {
// Implementation goes here.
}
};