Eötvös Quantum Utilities  v4.9.146
Providing the Horsepowers in the Quantum Realm
List of all members | Public Member Functions | Protected Attributes
LoadFromFile Class Reference

A class providing interface to load variables from a file. More...

Inheritance diagram for LoadFromFile:
Inheritance graph
[legend]

Public Member Functions

function ClearLoadedVariables ()
 Disposes the loaded file. More...
 
function LoadFromFile (filenev)
 Constructor of the class. More...
 
function LoadVariable (varname, varargin)
 Loads a variable from the opened file. More...
 
function SaveLoadedVariables (varargin)
 Save the loaded variables. More...
 
function setLoadedVariable (varname, value, varargin)
 Sets a loaded variable. More...
 

Protected Attributes

Property filename
 the filename More...
 
Property LoadedVariable
 structure containing the loaded data More...
 

Detailed Description

A class providing interface to load variables from a file.

Definition at line 24 of file LoadFromFile.m.

Constructor & Destructor Documentation

◆ LoadFromFile()

function LoadFromFile::LoadFromFile ( filenev  )

Constructor of the class.

Parameters
filenevThe string of the absolute path to the file to open. (Matlab can operate with relative paths as well)
Returns
An instance of the class

Member Function Documentation

◆ ClearLoadedVariables()

function LoadFromFile::ClearLoadedVariables ( )

Disposes the loaded file.

◆ LoadVariable()

function LoadFromFile::LoadVariable ( varname  ,
varargin   
)

Loads a variable from the opened file.

Parameters
varnameThe string containing the name of the variable.
vararginCell array of optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html):
'NoEmpty'Set 'On' for throw an error when the loaded variable is empty, or 'Off' (default) otherwise.
'StructName'String containing the name of a structure, when the wanted variable is a field of a structure.

◆ SaveLoadedVariables()

function LoadFromFile::SaveLoadedVariables ( varargin  )

Save the loaded variables.

Parameters
vararginCell array of optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html):
'filename'A string containing the path to the new file to be created instead of the original one.

◆ setLoadedVariable()

function LoadFromFile::setLoadedVariable ( varname  ,
value  ,
varargin   
)

Sets a loaded variable.

Parameters
varnameThe string containing the name of the variable.
valueThe value to be set.
vararginCell array of optional parameters (https://www.mathworks.com/help/matlab/ref/varargin.html):
'NoEmpty'Set 'On' for throw an error when the loaded variable is empty, or 'Off' (default) otherwise.
'StructName'String containing the name of a structure, when the wanted variable is a field of a structure.

Member Data Documentation

◆ filename

Property LoadFromFile::filename
protected

the filename

Definition at line 34 of file LoadFromFile.m.

◆ LoadedVariable

Property LoadFromFile::LoadedVariable
protected

structure containing the loaded data

Definition at line 31 of file LoadFromFile.m.


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