summaryrefslogtreecommitdiff
path: root/src/mbgl/style/style_observer.hpp
blob: c725334c103ea6250820cbc25feb09d00eb539dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef MBGL_STYLE_STYLE_OBSERVER
#define MBGL_STYLE_STYLE_OBSERVER

#include <mbgl/text/glyph_store_observer.hpp>
#include <mbgl/sprite/sprite_store_observer.hpp>
#include <mbgl/source/source_observer.hpp>

namespace mbgl {

class StyleObserver : public GlyphStoreObserver, public SpriteStoreObserver, public SourceObserver {
public:
    virtual ~StyleObserver() = default;

    /**
     * In addition to the individual glyph, sprite, and source events, the
     * following "rollup" events are provided for convenience. They are
     * strictly additive; e.g. when a source is loaded, both `onSourceLoaded`
     * and `onResourceLoaded` will be called.
     */
    virtual void onResourceLoaded() {}
    virtual void onResourceError(std::exception_ptr) {}
};

} // namespace mbgl

#endif