MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / main

Function main

applications/test/fileNameClean/Test-fileNameClean.C:63–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61// Main program:
62
63int main(int argc, char *argv[])
64{
65 argList::noBanner();
66 argList::noParallel();
67 argList::validArgs.insert("fileName .. fileNameN");
68 argList::addOption("istream", "file", "test Istream values");
69
70 argList args(argc, argv, false, true);
71
72 if (args.size() <= 1 && args.options().empty())
73 {
74 args.printUsage();
75 }
76
77 fileName pathName;
78 if (args.optionReadIfPresent("case", pathName))
79 {
80 Info<< nl
81 << "-case" << nl
82 << "path = " << args.path() << nl
83 << "root = " << args.rootPath() << nl
84 << "case = " << args.caseName() << nl
85 << "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
86 << "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
87 << endl;
88
89 printCleaning(pathName);
90 }
91
92 for (label argI=1; argI < args.size(); ++argI)
93 {
94 pathName = args[argI];
95 printCleaning(pathName);
96 }
97
98 if (args.optionFound("istream"))
99 {
100 args.optionLookup("istream")() >> pathName;
101
102 Info<< nl
103 << "-case" << nl
104 << "path = " << args.path() << nl
105 << "root = " << args.rootPath() << nl
106 << "case = " << args.caseName() << nl
107 << "FOAM_CASE=" << getEnv("FOAM_CASE") << nl
108 << "FOAM_CASENAME=" << getEnv("FOAM_CASENAME") << nl
109 << endl;
110
111 printCleaning(pathName);
112 }
113
114 Info<< "\nEnd\n" << endl;
115 return 0;
116}
117
118
119// ************************************************************************* //

Callers

nothing calls this directly

Calls 11

noBannerFunction · 0.85
noParallelFunction · 0.85
addOptionFunction · 0.85
printCleaningFunction · 0.85
optionReadIfPresentMethod · 0.80
optionFoundMethod · 0.80
optionLookupMethod · 0.80
insertMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
pathMethod · 0.45

Tested by

no test coverage detected