LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
documentReaderResources.cpp
Go to the documentation of this file.
1// Copyright 2004-2021 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
7
9
10using namespace std;
12
13
14namespace Lima
15{
16namespace DocumentsReader {
17
18
19DocumentsReaderResources::DocumentsReaderResources()
20 : m_objectManager() {}
21
22DocumentsReaderResources::~DocumentsReaderResources()
23{
24 // if( m_objectManager )
25 // delete m_objectManager;
26}
27
28std::shared_ptr<StructuredDocumentXMLParser> DocumentsReaderResources::getXmlParser(const std::string& id)
29 const
30{
31 auto res = m_objectManager->getObject(id);
32 auto xmlParserPtr = std::dynamic_pointer_cast<StructuredDocumentXMLParser>(res);
33 return xmlParserPtr;
34}
35
36std::shared_ptr<DocumentPropertyType> DocumentsReaderResources::getProperty(const std::string& id)
37 const
38{
39 auto res = m_objectManager->getObject(id);
40 auto attributePtr = std::dynamic_pointer_cast<DocumentPropertyType>(res);
41 return attributePtr;
42}
43
44void DocumentsReaderResources::init(
46{
48 m_objectManager=std::make_unique<AbstractReaderResource::Manager>(confModule,params);
49}
50
51} // DocumentsReader
52} // Lima
53
NAUTITIA.
STL namespace.
launch exception related to the configuration file parsing