 |
Gorgon Game Engine
|
Go to the documentation of this file.
17 virtual std::string
Name()
const = 0;
23 virtual std::string
Text()
const {
33 explicit TextData(std::string text =
"") : text(text) {}
45 virtual std::string
Name()
const override {
49 virtual std::string
Text()
const override {
71 explicit FileData(std::vector<std::string> files ={}) : files(std::move(files)) {}
73 explicit FileData(std::string file) : files({file}) {}
77 files.push_back(value);
82 files.erase(files.begin()+ind);
92 return (
int)files.size();
101 std::vector<std::string>::const_iterator
begin()
const {
102 return files.begin();
106 std::vector<std::string>::const_iterator
end()
const {
111 std::vector<std::string>::iterator
begin() {
112 return files.begin();
116 std::vector<std::string>::iterator
end() {
120 virtual std::string
Name()
const override {
128 virtual std::string
Text()
const override {
135 std::vector<std::string> files;
std::vector< std::string >::const_iterator end() const
To allow ranged based iteration.
Definition: DataExchange.h:106
constexpr Type File
File.
Definition: GID.h:84
ExchangeAction
Definition: DataExchange.h:66
@ Copy
Definition: DataExchange.h:68
virtual std::string Text() const
Should return the textual representation of the data. A datatype can simply return its typename.
Definition: DataExchange.h:23
constexpr Type Text
Stores text data, no longer a resource.
Definition: GID.h:134
std::string GetText() const
Returns the text in this data.
Definition: DataExchange.h:41
virtual Resource::GID::Type Type() const override
Should return the type id of the data.
Definition: DataExchange.h:53
virtual Resource::GID::Type Type() const =0
Should return the type id of the data.
FileData(std::string file)
Definition: DataExchange.h:73
std::vector< std::string >::iterator end()
To allow ranged based iteration.
Definition: DataExchange.h:116
virtual std::string Text() const override
Should return the textual representation of the data. A datatype can simply return its typename.
Definition: DataExchange.h:128
std::string Join(const T_ &vec, const std::string &glue=", ")
Joins a list of strings to a single string using the given glue text.
Definition: String.h:735
virtual std::string Name() const override
Should return the name of the data type.
Definition: DataExchange.h:120
virtual ~ExchangeData()
Definition: DataExchange.h:14
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
void Clear()
Clears the file list.
Definition: DataExchange.h:86
FileData(std::vector< std::string > files={})
Definition: DataExchange.h:71
std::string operator[](int ind) const
Returns the file at the given index.
Definition: DataExchange.h:96
Base object for data to be exchanged.
Definition: DataExchange.h:12
Stores text data for data exchange.
Definition: DataExchange.h:31
void AddFile(std::string value)
Adds a new file to the list.
Definition: DataExchange.h:76
int GetSize() const
Returns the number of files in the list.
Definition: DataExchange.h:91
virtual Resource::GID::Type Type() const override
Should return the type id of the data.
Definition: DataExchange.h:124
virtual std::string Name() const =0
Should return the name of the data type.
virtual std::string Name() const override
Should return the name of the data type.
Definition: DataExchange.h:45
@ Move
Definition: DataExchange.h:67
std::vector< std::string >::const_iterator begin() const
To allow ranged based iteration.
Definition: DataExchange.h:101
Type to store GID information.
Definition: GID.h:23
TextData(std::string text="")
Definition: DataExchange.h:33
Stores list of files for data exchange.
Definition: DataExchange.h:64
void SetText(std::string value)
Changes the text in this data.
Definition: DataExchange.h:36
void RemoveFile(int ind)
Removes a file from the list.
Definition: DataExchange.h:81
ExchangeAction Action
Definition: DataExchange.h:132
std::vector< std::string >::iterator begin()
To allow ranged based iteration.
Definition: DataExchange.h:111
virtual std::string Text() const override
Should return the textual representation of the data. A datatype can simply return its typename.
Definition: DataExchange.h:49