OpenASIP  2.0
OperationBuilder.hh
Go to the documentation of this file.
1 /*
2  Copyright (c) 2002-2009 Tampere University.
3 
4  This file is part of TTA-Based Codesign Environment (TCE).
5 
6  Permission is hereby granted, free of charge, to any person obtaining a
7  copy of this software and associated documentation files (the "Software"),
8  to deal in the Software without restriction, including without limitation
9  the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  and/or sell copies of the Software, and to permit persons to whom the
11  Software is furnished to do so, subject to the following conditions:
12 
13  The above copyright notice and this permission notice shall be included in
14  all copies or substantial portions of the Software.
15 
16  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19  THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22  DEALINGS IN THE SOFTWARE.
23  */
24 /**
25  * @file OperationBuilder.cc
26  *
27  * Declaration of OperationBuilder class.
28  *
29  * @author Jussi Nykänen 2004 (nykanen-no.spam-cs.tut.fi)
30  * @note rating: red
31  */
32 
33 #ifndef TTA_OPERATION_BUILDER_HH
34 #define TTA_OPERATION_BUILDER_HH
35 
36 #include <string>
37 #include <vector>
38 
39 /**
40  * Class that handles building the operation behavior.
41  */
43 public:
44  static OperationBuilder& instance();
45 
46  std::string xmlFilePath(const std::string& xmlFile);
47  std::string behaviorFile(
48  const std::string& baseName,
49  std::string& path);
50 
51  bool buildObject(const std::string& baseName,
52  const std::string& behaviorFile,
53  const std::string& path,
54  std::vector<std::string>& output);
55 
56  bool installDataFile(
57  const std::string& path,
58  const std::string& xmlFile,
59  const std::string& destination);
60 
61  bool verifyXML(const std::string file);
62 
63 private:
65  virtual ~OperationBuilder();
66 
67  std::string makeIncludeString(const std::vector<std::string>& paths);
68 
69  /// Static unique instance.
71 };
72 
73 #endif
OperationBuilder::xmlFilePath
std::string xmlFilePath(const std::string &xmlFile)
Definition: OperationBuilder.cc:88
OperationBuilder::~OperationBuilder
virtual ~OperationBuilder()
Definition: OperationBuilder.cc:62
OperationBuilder::behaviorFile
std::string behaviorFile(const std::string &baseName, std::string &path)
Definition: OperationBuilder.cc:115
OperationBuilder
Definition: OperationBuilder.hh:42
OperationBuilder::makeIncludeString
std::string makeIncludeString(const std::vector< std::string > &paths)
Definition: OperationBuilder.cc:284
OperationBuilder::buildObject
bool buildObject(const std::string &baseName, const std::string &behaviorFile, const std::string &path, std::vector< std::string > &output)
Definition: OperationBuilder.cc:141
OperationBuilder::verifyXML
bool verifyXML(const std::string file)
Definition: OperationBuilder.cc:263
OperationBuilder::instance_
static OperationBuilder * instance_
Static unique instance.
Definition: OperationBuilder.hh:70
OperationBuilder::installDataFile
bool installDataFile(const std::string &path, const std::string &xmlFile, const std::string &destination)
Definition: OperationBuilder.cc:224
OperationBuilder::instance
static OperationBuilder & instance()
Definition: OperationBuilder.cc:71
OperationBuilder::OperationBuilder
OperationBuilder()
Definition: OperationBuilder.cc:56