tec::ScriptFile

#include <script-file.hpp>

Public Functions

Name
ScriptFile() =default
bool Load(const Path & _filename)
Returns a resource with the specified name.
ScriptFile(const ScriptFile & ) =delete
ScriptFile & operator=(const ScriptFile & ) =delete
ScriptFile(ScriptFile && other)
ScriptFile & operator=(ScriptFile && other)
const std::string & GetScript() const
Returns a reference to the script text for reading.
std::string & GetScript()
Returns a reference to the script text.
const std::string GetName() const
void SetName(const std::string & _name)
bool IsDirty() const
void Invalidate()
Mark dirty.
void Validate()
Mark not dirty.
std::shared_ptr< ScriptFile > Create(const Path & fname)
Returns a resource with the specified name.
std::shared_ptr< ScriptFile > Create(const std::string name, const Path & filename =Path())
Factory method that creates a Script and stores it in the ScriptMap under name. It will optionally load a script file with the given filename.

Protected Attributes

Name
std::string name
std::string script
Path filename
bool dirty

Public Functions Documentation

function ScriptFile

ScriptFile() =default

function Load

bool Load(
    const Path & _filename
)

Returns a resource with the specified name.

Parameters:

  • const Path filename The filename of the image file to load.

Return: bool True if initialization finished with no errors.

function ScriptFile

ScriptFile(
    const ScriptFile & 
) =delete

function operator=

ScriptFile & operator=(
    const ScriptFile & 
) =delete

function ScriptFile

inline ScriptFile(
    ScriptFile && other
)

function operator=

inline ScriptFile & operator=(
    ScriptFile && other
)

function GetScript

inline const std::string & GetScript() const

Returns a reference to the script text for reading.

function GetScript

inline std::string & GetScript()

Returns a reference to the script text.

function GetName

inline const std::string GetName() const

function SetName

inline void SetName(
    const std::string & _name
)

function IsDirty

inline bool IsDirty() const

function Invalidate

inline void Invalidate()

Mark dirty.

function Validate

inline void Validate()

Mark not dirty.

function Create

static std::shared_ptr< ScriptFile > Create(
    const Path & fname
)

Returns a resource with the specified name.

Parameters:

  • const std::vector& properties The creation properties for the resource.

Return: std::shared_ptr The created ScriptFile resource.

The only used initialization property is "filename".

function Create

static inline std::shared_ptr< ScriptFile > Create(
    const std::string name,
    const Path & filename =Path()
)

Factory method that creates a Script and stores it in the ScriptMap under name. It will optionally load a script file with the given filename.

Parameters:

  • const std::string name The name to store the PixelBuffer under.
  • const Path filename The optional filename of the script to load.

Return: std::shared_ptr The created PixelBuffer.

Protected Attributes Documentation

variable name

std::string name;

variable script

std::string script;

variable filename

Path filename;

variable dirty

bool dirty {false};

Updated on 2022-07-24 at 19:27:35 +0000