Changes between Version 1 and Version 2 of documentation/C++Manual/Contexts
- Timestamp:
- 04/01/08 12:17:42 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
documentation/C++Manual/Contexts
v1 v2 68 68 // @param[in] document_path The path to the document to load. 69 69 // @return The loaded document, or NULL if no document was loaded. 70 Rocket::Core::ElementDocument* LoadDocument(const EMP::Core::String& document_path);70 ElementDocument* LoadDocument(const EMP::Core::String& document_path); 71 71 }}} 72 72 73 73 The 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 75 You 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. 81 ElementDocument* LoadDocumentFromMemory(const EMP::Core::String& string); 82 }}} 74 83 75 84 To create a new, empty document you can populate dynamically, use the CreateDocument() function.