src/hbutils/document/hbdocumentloader.cpp
changeset 21 4633027730f5
parent 7 923ff622b8b9
equal deleted inserted replaced
7:923ff622b8b9 21:4633027730f5
    95 {
    95 {
    96     delete d_ptr;
    96     delete d_ptr;
    97 }
    97 }
    98 
    98 
    99 /*!
    99 /*!
   100     Loads and processes DocML file. If After processing of file was successful,
   100     Loads and processes DocML file. 
   101     it returnes root objects list as a return parameter. Otherwise returnes empty list. 
   101 
   102     Qwnership to loaded objects is passed to the caller.
   102     On successful execution, returns a list of root objects. This list contains 
       
   103     only the objects which do not have an owner already e.g. child of a parent 
       
   104     widget is never returned, and the parent is only returned if it does not 
       
   105     have its own parent or some specific role like menu-role. The document 
       
   106     loader instance does not own any of the objects: the ones which do not 
       
   107     have any other owner are returned within the root object list. The caller 
       
   108     is resposible of handling the lifetime of the returned objects.
       
   109 
       
   110     Usually this returns the view or the dialog which the loaded DocML defines. 
       
   111 
       
   112     There are also situations, when this returns an empty list. These cases 
       
   113     usually include sections, which change the existing properties and do not 
       
   114     create any new root objects. Also, the items passed with setObjectTree() 
       
   115     function are not returned. So, the success of the load() cannot be
       
   116     deternimed directly by the number of the returned objects. This is what
       
   117     the parameter \a ok is for.
       
   118 
       
   119     On failed execution, returns always an empty list and deletes possibly 
       
   120     semi-created object hierarchy.
       
   121 
   103     \param fileName file to be processed.
   122     \param fileName file to be processed.
   104     \param section space separated route to section, that you want to load.
   123     \param section space separated route to section, that you want to load.
   105     \param ok indicates if loading was successful.
   124     \param ok indicates if loading was successful.
   106     \return root objects list.
   125     \return root objects list.
   107 */
   126 */