summaryrefslogtreecommitdiff
path: root/Source/cmProcessTools.h
diff options
context:
space:
mode:
authorKitware Robot <kwrobot@kitware.com>2016-05-16 10:34:04 -0400
committerBrad King <brad.king@kitware.com>2016-05-16 16:05:19 -0400
commitd9fd2f5402eeaa345691313658e02b51038f570b (patch)
treedca71b9a7e267f4c6300da3eb770415381726785 /Source/cmProcessTools.h
parent82df6deaafb36cbbfd450202bb20b320f637751a (diff)
downloadcmake-d9fd2f5402eeaa345691313658e02b51038f570b.tar.gz
Revise C++ coding style using clang-format
Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * If you reached this commit for a line in `git blame`, re-run the blame operation starting at the parent of this commit to see older history for the content. * See the parent commit for instructions to rebase a change across this style transition commit.
Diffstat (limited to 'Source/cmProcessTools.h')
-rw-r--r--Source/cmProcessTools.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/Source/cmProcessTools.h b/Source/cmProcessTools.h
index 23833cabd9..a48e52b7b9 100644
--- a/Source/cmProcessTools.h
+++ b/Source/cmProcessTools.h
@@ -29,9 +29,13 @@ public:
done incrementally. Returns true if the parser is interested
in any more data and false if it is done. */
bool Process(const char* data, int length)
- { return this->ProcessChunk(data, length); }
+ {
+ return this->ProcessChunk(data, length);
+ }
bool Process(const char* data)
- { return this->Process(data, static_cast<int>(strlen(data))); }
+ {
+ return this->Process(data, static_cast<int>(strlen(data)));
+ }
virtual ~OutputParser() {}
protected:
@@ -41,7 +45,7 @@ public:
};
/** Process output parser that extracts one line at a time. */
- class LineParser: public OutputParser
+ class LineParser : public OutputParser
{
public:
/** Construct with line separation character and choose whether to
@@ -50,6 +54,7 @@ public:
/** Configure logging of lines as they are extracted. */
void SetLog(std::ostream* log, const char* prefix);
+
protected:
std::ostream* Log;
const char* Prefix;
@@ -65,18 +70,21 @@ public:
};
/** Trivial line handler for simple logging. */
- class OutputLogger: public LineParser
+ class OutputLogger : public LineParser
{
public:
OutputLogger(std::ostream& log, const char* prefix = 0)
- { this->SetLog(&log, prefix); }
+ {
+ this->SetLog(&log, prefix);
+ }
+
private:
virtual bool ProcessLine() { return true; }
};
/** Run a process and send output to given parsers. */
- static void RunProcess(struct cmsysProcess_s* cp,
- OutputParser* out, OutputParser* err = 0);
+ static void RunProcess(struct cmsysProcess_s* cp, OutputParser* out,
+ OutputParser* err = 0);
};
#endif