WSF
USMTF_Parser.hpp
Go to the documentation of this file.
1// ****************************************************************************
2// CUI
3//
4// The Advanced Framework for Simulation, Integration, and Modeling (AFSIM)
5//
6// Copyright 2019 Infoscitex, a DCS Company. All rights reserved.
7//
8// The use, dissemination or disclosure of data in this file is subject to
9// limitation or restriction. See accompanying README and LICENSE for details.
10// ****************************************************************************
11
12
13#ifndef USMTFPARSER_HPP
14#define USMTFPARSER_HPP
15
16#include "usmtf_export.h"
17
18#include <ios>
19#include <memory>
20#include <string>
21
22#include "Message.hpp"
23#include "Set.hpp"
24#include "USMTF_Factory.hpp"
25
26namespace usmtf
27{
32class USMTF_EXPORT USMTF_Parser
33{
34public:
35 USMTF_Parser() = delete;
36 explicit USMTF_Parser(const std::string& aFileLocation) noexcept;
37 std::unique_ptr<Message> ReadMessage();
38
39private:
40 std::streampos AdvanceStreamToMainText(std::ifstream& aFs);
41 std::vector<Field> ReadFields(std::ifstream& aFs) noexcept;
42 std::vector<std::unique_ptr<Set>> ReadSets(std::ifstream& aFs) noexcept;
43 std::string mFileLocation;
44 MessageFactory* mMessageFactory;
45 SetFactory* mSetFactory;
46};
47
48} // namespace usmtf
49#endif
std::unique_ptr< Message > ReadMessage()
Definition USMTF_Parser.cpp:68
Definition Acmid.cpp:17
USMTF_Factory< Message, std::vector< std::unique_ptr< Set > > > MessageFactory
Definition USMTF_Factory.hpp:80
USMTF_Factory< Set, std::vector< Field > > SetFactory
Definition USMTF_Factory.hpp:81
Copyrights Multiple, All Rights Reserved