Changes between Version 1 and Version 2 of documentation/C++Manual/Contexts

Show
Ignore:
Author:
lloydw (IP: 203.96.63.172)
Timestamp:
04/01/08 12:17:42 (9 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • documentation/C++Manual/Contexts

    v1 v2  
    6868// @param[in] document_path The path to the document to load. 
    6969// @return The loaded document, or NULL if no document was loaded. 
    70 Rocket::Core::ElementDocument* LoadDocument(const EMP::Core::String& document_path); 
     70ElementDocument* LoadDocument(const EMP::Core::String& document_path); 
    7171}}} 
    7272 
    7373The document_path parameter will be given to Rocket's [wiki:documention/C++Manual/Interfaces#Thefileinterface file interface] to be open and read. If the document is loaded successfully, it will be added to the context and returned. Call Show() on the document to make it visible. 
     74 
     75You can also load documents directly from a memory stream, this can be useful if you want to receive documents over the network or similar. 
     76 
     77{{{ 
     78// Load a document into the context. 
     79// @param[in] string The string containing the document RML. 
     80// @return The loaded document, or NULL if no document was loaded. 
     81ElementDocument* LoadDocumentFromMemory(const EMP::Core::String& string); 
     82}}} 
    7483 
    7584To create a new, empty document you can populate dynamically, use the CreateDocument() function.