PeriDyno 1.0.0
Loading...
Searching...
No Matches
FilePath.inl
Go to the documentation of this file.
1#ifndef FILEPATH_SERIALIZATION
2#define FILEPATH_SERIALIZATION
3
4#include "Field.h"
5
6namespace dyno {
7 template<>
8 inline std::string FVar<FilePath>::serialize()
9 {
10 if (isEmpty())
11 return "";
12
13 FilePath val = this->getValue();
14
15 return val.string();
16 }
17
18 template<>
19 inline bool FVar<FilePath>::deserialize(const std::string& str)
20 {
21 if (str.empty())
22 return false;
23
24 this->setValue(str);
25
26 return true;
27 }
28
29 template class FVar<FilePath>;
30}
31
32#endif
bool isEmpty() override
Definition Field.h:58
std::string serialize() override
Definition Field.h:55
bool deserialize(const std::string &str) override
Definition Field.h:56
float getValue()
Definition Field.h:130
void setValue(float val)
Definition Field.h:111
const std::string string()
Definition FilePath.h:16
This is an implementation of AdditiveCCD based on peridyno.
Definition Array.h:25