VPTissue Reference Manual
StartupFileXml.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2016 Universiteit Antwerpen
3  *
4  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
5  * the European Commission - subsequent versions of the EUPL (the "Licence");
6  * You may not use this work except in compliance with the Licence.
7  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the Licence is distributed on an "AS IS" basis,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the Licence for the specific language governing
13  * permissions and limitations under the Licence.
14  */
20 #include "StartupFileXml.h"
21 
22 #include "fileformats/PTreeFile.h"
23 
24 namespace SimPT_Shell {
25 namespace Ws {
26 
27 using namespace std;
28 using namespace boost::property_tree;
29 using namespace SimPT_Sim::Util;
30 
31 StartupFileXml::StartupFileXml(const string& path)
32  : StartupFilePtree(path),
33  m_compressor(path)
34 {
35 }
36 
37 vector<QAction*> StartupFileXml::GetContextMenuActions() const
38 {
39  return { m_compressor.GetActionCompress() };
40 }
41 
43 {
44  ptree pt;
45  PTreeFile::ReadXml(m_path, pt);
46  return pt;
47 }
48 
49 } // namespace
50 } // namespace
virtual std::vector< QAction * > GetContextMenuActions() const
STL namespace.
Interface for PTreeFile.
Namespace for miscellaneous utilities.
Definition: PTreeFile.cpp:44
Base class for files containing a Sim snapshot that can be read as a ptree.
Namespace for SimPT shell package.
Definition: Client.cpp:50
Interface for StartupFileXml.
virtual boost::property_tree::ptree ToPtree() const
StartupFileXml(const std::string &path)
Constructor.