class P1::CameraSdk::BaseEventType

Overview

Base class for Notification EventTypes. All event categories inherit from this class. More…

#include <C_P1CameraCommonEventTypes.h>

class BaseEventType
{
public:
    // enums

    enum Category;

    // fields

    const uint32_t id;
    const Category category;

    // methods

    MSVC_ALLOW_PUBLIC_STL(std::string const name);
    bool operator == (BaseEventType const& other) const;
    bool operator != (BaseEventType const& other) const;
    virtual void dummy();
};

// direct descendants

class EventType;
class PropertyEventType;
class SdkEventType;

Detailed Documentation

Base class for Notification EventTypes. All event categories inherit from this class.

The BaseEventType is implemented as an Enumeration Class, as described here: https://t.ly/KUa3 (or Google “microsoft enumeration classes”)

This concept is that instead of using a tranditional enum, we can get better compile time type cheking of the enum values, by implementing them as subclasses of a base class. (Each enum value is a specific subclass.)

This allows us to do better compile time checks of which enum values are provided to functions as arguments. As an additional feature each value has human readable string representation.

Methods

virtual void dummy()

Dummy method to make class polymorphic (needed for downcast derived classes to this base class)