3 #include <assetloading/Asset.h>
17 template <
typename FullClass,
typename ... HatchArgs>
34 virtual FullClass
hatch(HatchArgs ...) = 0;
40 virtual std::shared_ptr<FullClass>
smartHatch(HatchArgs ...) = 0;
47 bool isEgg()
const override {
return true;}
Base class for all assets.
Definition: Asset.h:10
An EggAsset is an asset that can hatch to its full class.
Definition: EggAsset.h:18
virtual FullClass hatch(HatchArgs ...)=0
Hatch the egg class so the full class arises.
bool isEgg() const override
Definition: EggAsset.h:47
virtual std::shared_ptr< FullClass > smartHatch(HatchArgs ...)=0
Like the hatch method but returning the full class as a shared smart pointer.
EggAsset()
Default constructor for EggAsset.
Definition: EggAsset.h:25