Gorgon Game Engine
FileData Class Reference

Stores list of files for data exchange. More...

Inheritance diagram for FileData:
[legend]

Public Types

enum  ExchangeAction { Move, Copy }
 

Public Member Functions

 FileData (std::string file)
 
 FileData (std::vector< std::string > files={})
 
void AddFile (std::string value)
 Adds a new file to the list. More...
 
std::vector< std::string >::iterator begin ()
 To allow ranged based iteration. More...
 
std::vector< std::string >::const_iterator begin () const
 To allow ranged based iteration. More...
 
void Clear ()
 Clears the file list. More...
 
std::vector< std::string >::iterator end ()
 To allow ranged based iteration. More...
 
std::vector< std::string >::const_iterator end () const
 To allow ranged based iteration. More...
 
int GetSize () const
 Returns the number of files in the list. More...
 
virtual std::string Name () const override
 Should return the name of the data type. More...
 
std::string operator[] (int ind) const
 Returns the file at the given index. More...
 
void RemoveFile (int ind)
 Removes a file from the list. More...
 
virtual std::string Text () const override
 Should return the textual representation of the data. A datatype can simply return its typename. More...
 
virtual Resource::GID::Type Type () const override
 Should return the type id of the data. More...
 
- Public Member Functions inherited from ExchangeData
virtual ~ExchangeData ()
 

Public Attributes

ExchangeAction Action
 

Detailed Description

Stores list of files for data exchange.

Member Enumeration Documentation

◆ ExchangeAction

Enumerator
Move 
Copy 

Constructor & Destructor Documentation

◆ FileData() [1/2]

FileData ( std::vector< std::string >  files = {})
explicit

◆ FileData() [2/2]

FileData ( std::string  file)
explicit

Member Function Documentation

◆ AddFile()

void AddFile ( std::string  value)

Adds a new file to the list.

◆ begin() [1/2]

std::vector<std::string>::iterator begin ( )

To allow ranged based iteration.

◆ begin() [2/2]

std::vector<std::string>::const_iterator begin ( ) const

To allow ranged based iteration.

◆ Clear()

void Clear ( )

Clears the file list.

◆ end() [1/2]

std::vector<std::string>::iterator end ( )

To allow ranged based iteration.

◆ end() [2/2]

std::vector<std::string>::const_iterator end ( ) const

To allow ranged based iteration.

◆ GetSize()

int GetSize ( ) const

Returns the number of files in the list.

◆ Name()

virtual std::string Name ( ) const
overridevirtual

Should return the name of the data type.

Implements ExchangeData.

◆ operator[]()

std::string operator[] ( int  ind) const

Returns the file at the given index.

◆ RemoveFile()

void RemoveFile ( int  ind)

Removes a file from the list.

◆ Text()

virtual std::string Text ( ) const
overridevirtual

Should return the textual representation of the data. A datatype can simply return its typename.

Reimplemented from ExchangeData.

References Gorgon::String::Join().

◆ Type()

virtual Resource::GID::Type Type ( ) const
overridevirtual

Should return the type id of the data.

Implements ExchangeData.

References Gorgon::Resource::GID::File.

Member Data Documentation

◆ Action


The documentation for this class was generated from the following file: