RawImage.hpp

Handle the fundamental loading of an image (without Widget tracking)

This file is part of Empirical, https://github.com/devosoft/Empirical Copyright (C) 2015-2018 Michigan State University MIT Software license; see doc/LICENSE.md

Defines

INCLUDE_EMP_WEB_RAW_IMAGE_HPP_GUARD
class RawImage
#include <RawImage.hpp>

Fundamental information about a single image.

Public Functions

inline RawImage(const std::string &url)
RawImage(const RawImage&) = default
inline ~RawImage()
RawImage &operator=(const RawImage&) = default
inline int GetID() const
inline const std::string &GetURL() const
inline bool HasLoaded() const
inline bool HasError() const
inline void OnLoad(const std::function<void()> &callback_fun)

Add a new function to be called when the image finishes loading.

inline void OnError(const std::function<void()> &callback_fun)

Add a new function to be called if an image load has an error.

Private Members

Ptr<internal::ImageInfo> info

Private Static Functions

static inline internal::ImageManager &GetManager()