MySources/mesh.hpp

32 lines
717 B
C++
Raw Normal View History

2021-03-15 18:04:29 +01:00
#ifndef MESH_HPP
#define MESH_HPP
2022-01-14 14:02:27 +01:00
#include <filesystem>
2021-03-15 18:04:29 +01:00
#include <string>
2021-04-08 20:03:23 +02:00
class Mesh
{
protected:
2021-04-30 12:13:58 +02:00
std::string label{"empty_label"};
2021-03-15 18:04:29 +01:00
public:
virtual ~Mesh() = default;
2022-01-14 14:02:27 +01:00
virtual bool load(const std::filesystem::path &meshFilePath) { return false; }
virtual bool save(const std::filesystem::path &meshFilePath) { return false; }
2021-04-08 20:03:23 +02:00
2021-03-15 18:04:29 +01:00
std::string getLabel() const;
void setLabel(const std::string &newLabel);
2021-04-30 12:13:58 +02:00
void prependToLabel(const std::string &text);
2021-03-15 18:04:29 +01:00
};
inline std::string Mesh::getLabel() const { return label; }
inline void Mesh::setLabel(const std::string &newLabel) { label = newLabel; }
2021-04-30 12:13:58 +02:00
inline void Mesh::prependToLabel(const std::string &text)
{
label = text + label;
}
2021-03-15 18:04:29 +01:00
#endif // MESH_HPP