dm_lua_to Interface

public interface dm_lua_to

Converts Lua table to Fortran derived type.


Module Procedures

private function lua_to_job(lua, job) result(rc)

Reads Lua table into Fortran job type. The table has to be on top of the stack and will be removed once finished.

Arguments

Type IntentOptional Attributes Name
type(lua_state_type), intent(inout) :: lua

Lua type.

type(job_type), intent(out) :: job

Job type.

Return Value integer

private function lua_to_job_list(lua, job_list) result(rc)

Reads Lua table into Fortran job list. The table has to be on top of the stack and will be removed once finished.

Arguments

Type IntentOptional Attributes Name
type(lua_state_type), intent(inout) :: lua

Lua type.

type(job_list_type), intent(out) :: job_list

Job list type.

Return Value integer

private function lua_to_jobs(lua, jobs) result(rc)

Reads Lua table into Fortran jobs type array. The table has to be on top of the stack and will be removed once finished.

The functions returns the following error codes:

  • E_ALLOC if the array allocation failed.
  • E_EMPTY if the table is empty.
  • E_TYPE if the stack element is not a table.

Arguments

Type IntentOptional Attributes Name
type(lua_state_type), intent(inout) :: lua

Lua type.

type(job_type), intent(out), allocatable :: jobs(:)

Job type array.

Return Value integer

private function lua_to_observ(lua, observ) result(rc)

Reads Lua table into Fortran observation type. The table has to be on top of the stack and will be removed once finished.

Arguments

Type IntentOptional Attributes Name
type(lua_state_type), intent(inout) :: lua

Lua type.

type(observ_type), intent(out) :: observ

Observation type.

Return Value integer

private function lua_to_observs(lua, observs) result(rc)

Reads Lua table into Fortran observation type array. The table has to be on top of the stack and will be removed once finished.

Arguments

Type IntentOptional Attributes Name
type(lua_state_type), intent(inout) :: lua

Lua type.

type(observ_type), intent(out), allocatable :: observs(:)

Observation type array.

Return Value integer

private function lua_to_report(lua, report) result(rc)

Reads Lua table into Fortran report type. The table has to be on top of the stack and will be removed once finished.

Arguments

Type IntentOptional Attributes Name
type(lua_state_type), intent(inout) :: lua

Lua type.

type(report_type), intent(out) :: report

Report type.

Return Value integer

private function lua_to_request(lua, request) result(rc)

Reads Lua table into Fortran request type. The table has to be on top of the stack and will be removed once finished.

Arguments

Type IntentOptional Attributes Name
type(lua_state_type), intent(inout) :: lua

Lua type.

type(request_type), intent(out) :: request

Request type.

Return Value integer