Template Struct MapInterface

Struct Documentation

template<typename MapType>
struct backend::MapInterface

This struct defines the basic functions if you want to use advanced map manager commands (e.g.

save or merge) in your map.

To use these for your map type and use these functions from the map manager, first create the traits:

template <>
struct traits<MyMapType> : public backend::MapTraits<MyMapType> {};

Then adjust the definition of MyMapType:

class MyMapType : public MapInterface<MyMapType> {
  // Your members here.
  ...

  // Also implement the functions from MapInterface.
  virtual void deepCopy(const MapType& other) override;
  ...
};
Note: You may also need to inherit from backend::ResourceMap.

Public Functions

virtual void deepCopy(const MapType &other) = 0
virtual bool mergeAllMissionsFromMap(const MapType &other) = 0
virtual bool mergeAllSubmapsFromMap(const MapType &other) = 0
virtual bool loadFromFolder(const std::string &folder_path) = 0
virtual bool saveToFolder(const std::string &folder_path, const SaveConfig &config) = 0