Helios++
Helios software for LiDAR simulations
EggAsset.h
1 #pragma once
2 
3 #include <assetloading/Asset.h>
4 
5 #include <memory>
6 
17 template <typename FullClass, typename ... HatchArgs>
18 class EggAsset : public Asset{
19 public:
20  // *** CONSTRUCTION / DESTRUCTION *** //
21  // ************************************ //
25  EggAsset() : Asset() {}
26  virtual ~EggAsset() = default;
27 
28  // *** EGG METHODS *** //
29  // ********************* //
34  virtual FullClass hatch(HatchArgs ...) = 0;
40  virtual std::shared_ptr<FullClass> smartHatch(HatchArgs ...) = 0;
41 
42  // *** GETTERs and SETTERs *** //
43  // ***************************** //
47  bool isEgg() const override {return true;}
48 
49 
50 };
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