Helios++
Helios software for LiDAR simulations
Asset.h
1 #pragma once
2 
3 #include <string>
4 
5 #include <boost/serialization/base_object.hpp>
6 
10 class Asset {
11  // *** SERIALIZATION *** //
12  // *********************** //
13 private:
14  friend class boost::serialization::access;
21  template<class Archive>
22  void serialize(Archive &ar, const unsigned int version) {
23  ar & id;
24  ar & name;
25  ar & sourceFilePath;
26  }
27 
28 public:
29  // *** ATTRIBUTES *** //
30  // ******************** //
34  std::string id = "";
38  std::string name = "Unnamed Asset";
42  std::string sourceFilePath = "";
43 
44  // *** CONSTRUCTION / DESTRUCTION *** //
45  // ************************************ //
46  virtual ~Asset() {}
47 
48  // *** GETTERS and SETTERS *** //
49  // ***************************** //
54  std::string getLocationString() {
55  return sourceFilePath + "#" + id;
56  }
62  virtual bool isEgg() const {return false;}
63 };
Base class for all assets.
Definition: Asset.h:10
std::string sourceFilePath
Path to asset file.
Definition: Asset.h:42
void serialize(Archive &ar, const unsigned int version)
Serialize an Asset to a stream of bytes.
Definition: Asset.h:22
std::string getLocationString()
Obtain asset location string.
Definition: Asset.h:54
std::string name
Asset name.
Definition: Asset.h:38
std::string id
Asset identifier.
Definition: Asset.h:34
virtual bool isEgg() const
Check whether the asset is an EggAsset or not.
Definition: Asset.h:62