Input/Output Manager. More...
Public Member Functions | |
| IOMng (IParallelSuperMng *psm) | |
| IOMng (IParallelMng *pm) | |
| IXmlDocumentHolder * | parseXmlFile (const String &filename, const String &schemaname=String()) override |
| Reads and parses the XML file filename. | |
| IXmlDocumentHolder * | parseXmlFile (const String &filename, const String &schemaname, ByteConstArrayView schema_data) override |
| IXmlDocumentHolder * | parseXmlBuffer (Span< const Byte > buffer, const String &name) override |
| Reads and parses the XML file contained in the buffer buffer. | |
| IXmlDocumentHolder * | parseXmlBuffer (Span< const std::byte > buffer, const String &name) override |
| Reads and parses the XML file contained in the buffer buffer. | |
| IXmlDocumentHolder * | parseXmlString (const String &str, const String &name) override |
| Reads and parses the XML file contained in the string str. | |
| bool | writeXmlFile (IXmlDocumentHolder *doc, const String &filename, const bool indented) override |
| Writes the XML tree of the document doc to the file filename. | |
| bool | collectiveRead (const String &filename, ByteArray &bytes) override |
| Collective reading of a file. | |
| bool | collectiveRead (const String &filename, ByteArray &bytes, bool is_binary) override |
| Collective reading of a file. | |
| bool | localRead (const String &filename, ByteArray &bytes) override |
| Local reading of a file. | |
| bool | localRead (const String &filename, ByteArray &bytes, bool is_binary) override |
| Local reading of a file. | |
| Public Member Functions inherited from Arcane::IIOMng | |
| virtual | ~IIOMng ()=default |
| Frees resources. | |
| virtual IXmlDocumentHolder * | parseXmlFile (const String &filename, const String &schemaname, ConstArrayView< Byte > schema_data)=0 |
| Reads and parses the XML file filename. | |
Private Member Functions | |
| template<typename ParallelMngType> | |
| bool | _collectiveRead (ParallelMngType *pm, const String &filename, ByteArray &bytes, bool is_binary) |
Private Attributes | |
| IParallelMng * | m_parallel_mng |
| IParallelSuperMng * | m_parallel_super_mng |
| IThreadMng * | m_thread_mng |
| ITraceMng * | m_trace_mng |
| Arcane::IOMng::IOMng | ( | IParallelSuperMng * | psm | ) |
| Arcane::IOMng::IOMng | ( | IParallelMng * | pm | ) |
|
inlineoverridevirtual |
Collective reading of a file.
Collectively reads the file filename and returns its content in bytes. The file is considered a binary file. Collective reading means that all processors call this operation and will read the same file. The implementation can then optimize disk access by grouping the actual reading on one or more processors and then sending the file content to the others.
| true | in case of an error |
| false | if everything is okay. |
Implements Arcane::IIOMng.
Definition at line 57 of file IOMng.cc.
References collectiveRead().
Referenced by collectiveRead().
|
overridevirtual |
Collective reading of a file.
Collectively reads the file filename and returns its content in bytes. The file is considered a binary file if is_binary is true. Collective reading means that all processors call this operation and will read the same file. The implementation can then optimize disk access by grouping the actual reading on one or more processors and then sending the file content to the others.
| true | in case of an error |
| false | if everything is okay. |
Implements Arcane::IIOMng.
Local reading of a file.
Locally reads the file filename and returns its content in bytes. The file is considered a binary file. This operation is not collective.
| true | in case of an error. |
| false | if everything is okay. |
Implements Arcane::IIOMng.
Definition at line 62 of file IOMng.cc.
References localRead().
Referenced by localRead().
|
overridevirtual |
Local reading of a file.
Locally reads the file filename and returns its content in bytes. This operation is not collective.
| true | in case of an error. |
| false | if everything is okay. |
Implements Arcane::IIOMng.
Definition at line 240 of file IOMng.cc.
References Arcane::platform::readAllFile().
|
overridevirtual |
Reads and parses the XML file contained in the buffer buffer.
In case of an error, returns 0. The caller owns the returned instance and must destroy it using the delete operator. The argument name associates a name with the memory area that is used for displaying error messages.
Implements Arcane::IIOMng.
Definition at line 170 of file IOMng.cc.
References Arcane::IXmlDocumentHolder::loadFromBuffer().
|
overridevirtual |
Reads and parses the XML file contained in the buffer buffer.
In case of an error, returns 0. The caller owns the returned instance and must destroy it using the delete operator. The argument name associates a name with the memory area that is used for displaying error messages.
Implements Arcane::IIOMng.
Definition at line 179 of file IOMng.cc.
References Arcane::IXmlDocumentHolder::loadFromBuffer().
|
override |
|
overridevirtual |
Reads and parses the XML file filename.
In case of an error, returns 0. The caller owns the returned instance and must destroy it using the delete operator. If a schema name is specified, the consistency of the file relative to the schema is checked.
Implements Arcane::IIOMng.
Definition at line 148 of file IOMng.cc.
References Arcane::IXmlDocumentHolder::loadFromFile().
|
overridevirtual |
Reads and parses the XML file contained in the string str.
In case of an error, returns 0. The caller owns the returned instance and must destroy it using the delete operator. The argument name associates a name with the memory area that is used for displaying error messages.
Implements Arcane::IIOMng.
Definition at line 188 of file IOMng.cc.
References Arcane::dom::DOMImplementation::_load(), Arcane::ConstArrayView< T >::data(), Arcane::ConstArrayView< T >::size(), and Arcane::String::utf8().
|
overridevirtual |
Writes the XML tree of the document doc to the file filename.
| true | in case of an error, |
Implements Arcane::IIOMng.
Definition at line 129 of file IOMng.cc.
References Arcane::IXmlDocumentHolder::documentNode(), Arcane::XmlNode::domNode(), and Arcane::String::localstr().
|
private |
|
private |
|
private |