Vuo  2.3.2
VuoCompilerIssue.hh
Go to the documentation of this file.
1 
10 #pragma once
11 
12 class VuoCable;
13 class VuoModule;
14 class VuoNode;
15 
20 {
21 public:
25  enum IssueType
26  {
28  Warning
29  };
30 
31  VuoCompilerIssue(void);
32  VuoCompilerIssue(IssueType issueType, const string &action, const string &filePath, const string &summary, const string &details);
33  IssueType getIssueType(void);
34  string getSummary(void);
35  string getDetails(bool htmlFormatted) const;
36  string getShortDescription(bool htmlFormatted) const;
37  string getLongDescription(bool htmlFormatted);
38  void setHint(const string &hint);
39  string getHint(bool htmlFormatted);
40  void setHelpPath(const string &path);
41  string getHelpPath(void);
42  void setFilePath(const string &filePath);
43  string getFilePath(void);
44  void setLineNumber(int lineNumber);
45  int getLineNumber(void);
46  void setModuleKey(const string &moduleKey);
47  void setLink(const string &url, const string &text);
48  void setModule(VuoModule *module);
49  void setNode(VuoNode *node);
50  void setNodes(const set<VuoNode *> &nodes);
51  set<VuoNode *> getNodes(void);
52  void setCables(const set<VuoCable *> &cables);
53  set<VuoCable *> getCables(void);
54  long getHash(void);
55 
56 private:
57  string getIssueTypeString(void);
58  string fillInPlaceholders(const string &s, bool htmlFormatted) const;
59 
60  IssueType issueType;
61  string action;
62  string summary;
63  string details;
64  string hint;
65  string helpPath;
66  string filePath;
67  int lineNumber;
68  string moduleKey;
69  string linkUrl;
70  string linkText;
71  VuoModule *module;
72  set<VuoNode *> nodes;
73  set<VuoCable *> cables;
74 };
75 
82 {
83 public:
84  VuoCompilerIssues(void);
85  VuoCompilerIssues(const VuoCompilerIssue &issue);
86  string getShortDescription(bool htmlFormatted);
87  string getLongDescription(bool htmlFormatted);
88  string getHint(bool htmlFormatted);
89  void setFilePathIfEmpty(const string &filePath);
90  void setFilePath(const string &filePath);
91  void append(const VuoCompilerIssue &issue);
92  void append(VuoCompilerIssues *otherIssues);
93  bool isEmpty(void);
94  vector<VuoCompilerIssue> getList(void);
96 
97 private:
98  vector<VuoCompilerIssue> issues;
99 };