TVGenerator  0.1
 All Classes Files Functions Pages
TVFileSettings.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * A test vector file generator for hardware designs.
4  * Copyright (C) 2014 ETHZ Zurich, Integrated Systems Laboratory
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  *
19  *****************************************************************************/
20 
32 #ifndef TVFILESETTINGS_H_
33 #define TVFILESETTINGS_H_
34 
35 #include <string>
36 #include <vector>
37 
38 #include "SignalDeclaration.h"
39 
40 using namespace std;
41 
50 
51 private:
52  // **************************************************************************
53  // Members
54  // **************************************************************************
55  string filePath_; // File name.
56  string projectName_; // Project name the test vector file belongs to.
57  string content_; // Describes the content of the test vector file.
58  string author_; // Author of the test vector file.
59  string commentIndicator_; // String starting a comment.
60  string columnIndicator_; // String indicating the alignment of the signals to their corresponding caption (column).
61  int signalDistance_; // Number of spaces between two testvectors.
62  int commentSpaces_; // Number of spaces between the last signal and the line ending comment (if enabled).
63  bool enableLineEndComments_; // Enable/Disable comments at end of line.
64  bool enablePreLineComments_; // Enable/Disable comments right before line.
65  string commentsColumnHeader_; // The string indicating a comment at the end of a line.
66  int signalCaptionInterval_; // The interval after which the signal caption header is printed again.
67  char dontCareIdentifier_; // The character to be used in order to identify don't care values.
68 
69  vector<SignalDeclaration> tvDeclarations_;
70 
71 public:
72  // **************************************************************************
73  // Constructors/Destructors
74  // **************************************************************************
76  TVFileSettings(string _filePath, string _author, string _content,
77  string _projectName);
78  TVFileSettings(string _filePath, string _author, string _content,
79  string _projectName, const string _commentIndicator,
80  const string _columnIndicator, const int _commentSpaces);
81  virtual ~TVFileSettings();
82 
83  // **************************************************************************
84  // Getter/Setter
85  // **************************************************************************
86  void setFilePath(const string _fileName) { filePath_ = _fileName; };
87  void setProjectName(const string _projectName) { projectName_ = _projectName; };
88  void setContent(const string _content) { content_ = _content; };
89  void setAuthor(const string _author) { author_ = _author; };
90  void enableLineEndComments(const bool _enableLineEndComments) {
91  enableLineEndComments_ = _enableLineEndComments; };
92  void enablePreLineComments(const bool _enablePreLineComments) {
93  enablePreLineComments_ = _enablePreLineComments; };
94  void setTVDeclarations(const vector<SignalDeclaration> & _tvDeclarations) {
95  tvDeclarations_ = _tvDeclarations; };
96  string getFilePath() const { return filePath_; };
97  string getProjectName() const { return projectName_; };
98  string getContent() const { return content_; };
99  string getAuthor() const { return author_; };
100  string getCommentIndicator() const { return commentIndicator_; };
101  string getColumnIndicator() const { return columnIndicator_; };
102  int getSignalDistance() const { return signalDistance_; };
103  int getCommentSpaces() const { return commentSpaces_; };
104  bool isEnableLineEndComments() const { return enableLineEndComments_; };
105  bool isEnablePreLineComments() const { return enablePreLineComments_; };
106  string getCommentsColumnHeader() const { return commentsColumnHeader_; };
107  int getSignalCaptionInterval() const { return signalCaptionInterval_; };
108  char getDontCareIdentifier() const { return dontCareIdentifier_; };
109 
110  vector<SignalDeclaration> getTVDeclarations() const { return tvDeclarations_; };
111 
112 
113  // **************************************************************************
114  // Public methods
115  // **************************************************************************
116  void AddSignal(const SignalDeclaration & _tvDeclaration);
117 
118 };
119 
120 #endif /* TVFILESETTINGS_H_ */
Signal declaration class.
Definition: SignalDeclaration.h:43
Test vector file settings.
Definition: TVFileSettings.h:49
Contains a class for declaration of signals.