StrobeEvent

This class is used to contain all estrobes in the level

class StrobeEvent
{
private:
    std::vector<std::tuple<size_t, unsigned char, bool>> _strobe;
    std::vector<std::tuple<size_t, unsigned char, bool>>::iterator _it;
    bool _init = true;
public:
    StrobeEvent();
    ~StrobeEvent();
    std::vector<std::tuple<size_t, unsigned char, bool>> getEvents(size_t currentTimecode);
    void addColor(size_t timecode, unsigned char color, size_t duration);
    void sort();
    bool isFinished() const;
    void setInit(bool init);
};

Constructor

StrobeEvent();

getEvents

this method return all the strobes that should be created in a timecode

std::vector<std::tuple<size_t, unsigned char, bool>> getEvents(size_t currentTimecode);

addColor

This method add a strobe in the _strobe vector

void addColor(size_t timecode, unsigned char color, size_t duration);

sort

This method is called when the file is fully pared. It sort the _strobe vector by timecode order

void sort();

isFinished

This method check if it remain entity in the _strobe vector

bool isFinished() const;

Last updated