-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathconflicts.cc
More file actions
37 lines (27 loc) · 1.09 KB
/
conflicts.cc
File metadata and controls
37 lines (27 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include "generator.ih"
bool Generator::conflicts() const
{
bool ret = false;
emsg.noLineNr();
emsg.setLineTag("");
string const &classHeaderPath = d_options.classHeaderPath();
if (Stat(classHeaderPath))
{
ret = errExisting(classHeaderPath, "class-name",
"^\\s*class\\s+" + d_options.className() + "\\b")
or ret;
if (not d_options.nameSpace().empty())
ret = errExisting(classHeaderPath, "namespace",
"^\\s*namespace\\s+" + d_options.nameSpace() + "\\b")
or ret;
ret = errExisting(classHeaderPath, Options::baseclassHeaderSpec(),
"^\\s*#include\\s+\"" + d_options.baseclassHeaderName() + '"')
or ret;
}
string const &implementationHeader = d_options.implementationHeaderPath();
if (Stat(implementationHeader))
ret = errExisting(implementationHeader, d_options.classHeaderSpec(),
"^\\s*#include\\s+\"" + d_options.classHeaderName() + '"')
or ret;
return ret;
}