Leviathan  0.8.0.0
Leviathan game engine
Leviathan::ScriptSourceFileData Struct Reference

Represents a section of script source file. More...

#include <ScriptModule.h>

Public Member Functions

DLLEXPORT ScriptSourceFileData (const std::string &file, int line, const std::string &code)
 

Public Attributes

std::string SourceFile
 
int StartLine
 
std::shared_ptr< std::string > SourceCode
 

Detailed Description

Represents a section of script source file.

Definition at line 71 of file ScriptModule.h.

Constructor & Destructor Documentation

◆ ScriptSourceFileData()

DLLEXPORT ScriptSourceFileData::ScriptSourceFileData ( const std::string &  file,
int  line,
const std::string &  code 
)
Parameters
lineThe line to start from. First line in a file is 1

Definition at line 837 of file ScriptModule.cpp.

838  :
839  SourceFile(file),
840  StartLine(line), SourceCode(std::make_shared<std::string>(code))
841 {
842 }
std::shared_ptr< std::string > SourceCode
Definition: ScriptModule.h:82

Member Data Documentation

◆ SourceCode

std::shared_ptr<std::string> Leviathan::ScriptSourceFileData::SourceCode

The source is stored here to allow saving it to a file This being a shared pointer allows for more efficient copying

Definition at line 82 of file ScriptModule.h.

◆ SourceFile

std::string Leviathan::ScriptSourceFileData::SourceFile

Definition at line 77 of file ScriptModule.h.

◆ StartLine

int Leviathan::ScriptSourceFileData::StartLine

Definition at line 78 of file ScriptModule.h.


The documentation for this struct was generated from the following files: