This subroutine opens all the tables on the way to the final head node of
the given path.
The handle can be either passed in, to be used for the
look up of the path, or, when specifying the optional
openLua argument as true, it will return the handle to
the newly opened Lua script.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Source Code
subroutine aot_path_open_table(me,conf,thandle,openLua)!> The path object to open as a functiontype(aot_path_type),intent(inout)::me!> The flu_state handle, which is either opened according to!! the path, or used to open the path in.type(flu_state)::conf!> return handle of the last opened tableinteger,intent(out)::thandle!> A flag to indicate, wether to open the Lua script, default!! is false, in which case the conf argument has to link to!! an actual Lua state handle.logical,intent(in),optional::openLualogical::new_conftype(aot_path_node_type),pointer::curNode=>NULL()integer::myHandle=0integer::prevHandle=-1if(present(openLua))thennew_conf=openLuaelsenew_conf=.false.end if if(new_conf)then call open_config_file(conf,me%LuaFilename)end ifcurNode=>me%GlobalNodeif(curNode%NodeType=='table')then select case(curNode%ID_kind)case('key')call aot_table_open(L=conf,thandle=me%roothandle,key=curNode%key)end select if(associated(curNode%child))thencurNode=>curNode%childmyHandle=me%rootHandleend if end if do while(associated(curNode%child))prevHandle=myHandleselect case(curNode%ID_kind)case('key')call aot_table_open(L=conf,thandle=myHandle,parent=prevHandle,&&key=curNode%key)case('position')call aot_table_open(L=conf,thandle=myHandle,parent=prevHandle,&&pos=curNode%pos)end selectcurNode=>curNode%childend dothandle=myHandleend subroutine aot_path_open_table