summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluator.h')
-rw-r--r--Source/cmGeneratorExpressionEvaluator.h69
1 files changed, 28 insertions, 41 deletions
diff --git a/Source/cmGeneratorExpressionEvaluator.h b/Source/cmGeneratorExpressionEvaluator.h
index bce486b..7ca62c5 100644
--- a/Source/cmGeneratorExpressionEvaluator.h
+++ b/Source/cmGeneratorExpressionEvaluator.h
@@ -35,93 +35,80 @@ struct cmGeneratorExpressionEvaluator
virtual Type GetType() const = 0;
- virtual std::string Evaluate(cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *) const = 0;
+ virtual std::string Evaluate(cmGeneratorExpressionContext* context,
+ cmGeneratorExpressionDAGChecker*) const = 0;
private:
- cmGeneratorExpressionEvaluator(const cmGeneratorExpressionEvaluator &);
- void operator=(const cmGeneratorExpressionEvaluator &);
+ cmGeneratorExpressionEvaluator(const cmGeneratorExpressionEvaluator&);
+ void operator=(const cmGeneratorExpressionEvaluator&);
};
struct TextContent : public cmGeneratorExpressionEvaluator
{
- TextContent(const char *start, size_t length)
- : Content(start), Length(length)
+ TextContent(const char* start, size_t length)
+ : Content(start)
+ , Length(length)
{
-
}
- std::string Evaluate(cmGeneratorExpressionContext *,
- cmGeneratorExpressionDAGChecker *) const
+ std::string Evaluate(cmGeneratorExpressionContext*,
+ cmGeneratorExpressionDAGChecker*) const
{
return std::string(this->Content, this->Length);
}
- Type GetType() const
- {
- return cmGeneratorExpressionEvaluator::Text;
- }
+ Type GetType() const { return cmGeneratorExpressionEvaluator::Text; }
- void Extend(size_t length)
- {
- this->Length += length;
- }
+ void Extend(size_t length) { this->Length += length; }
- size_t GetLength()
- {
- return this->Length;
- }
+ size_t GetLength() { return this->Length; }
private:
- const char *Content;
+ const char* Content;
size_t Length;
};
struct GeneratorExpressionContent : public cmGeneratorExpressionEvaluator
{
- GeneratorExpressionContent(const char *startContent, size_t length);
+ GeneratorExpressionContent(const char* startContent, size_t length);
void SetIdentifier(std::vector<cmGeneratorExpressionEvaluator*> identifier)
{
this->IdentifierChildren = identifier;
}
void SetParameters(
- std::vector<std::vector<cmGeneratorExpressionEvaluator*> > parameters)
+ std::vector<std::vector<cmGeneratorExpressionEvaluator*> > parameters)
{
this->ParamChildren = parameters;
}
- Type GetType() const
- {
- return cmGeneratorExpressionEvaluator::Generator;
- }
+ Type GetType() const { return cmGeneratorExpressionEvaluator::Generator; }
- std::string Evaluate(cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *) const;
+ std::string Evaluate(cmGeneratorExpressionContext* context,
+ cmGeneratorExpressionDAGChecker*) const;
std::string GetOriginalExpression() const;
~GeneratorExpressionContent();
private:
- std::string EvaluateParameters(const cmGeneratorExpressionNode *node,
- const std::string &identifier,
- cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *dagChecker,
- std::vector<std::string> &parameters) const;
+ std::string EvaluateParameters(const cmGeneratorExpressionNode* node,
+ const std::string& identifier,
+ cmGeneratorExpressionContext* context,
+ cmGeneratorExpressionDAGChecker* dagChecker,
+ std::vector<std::string>& parameters) const;
std::string ProcessArbitraryContent(
- const cmGeneratorExpressionNode *node,
- const std::string &identifier,
- cmGeneratorExpressionContext *context,
- cmGeneratorExpressionDAGChecker *dagChecker,
+ const cmGeneratorExpressionNode* node, const std::string& identifier,
+ cmGeneratorExpressionContext* context,
+ cmGeneratorExpressionDAGChecker* dagChecker,
std::vector<std::vector<cmGeneratorExpressionEvaluator*> >::const_iterator
- pit) const;
+ pit) const;
private:
std::vector<cmGeneratorExpressionEvaluator*> IdentifierChildren;
std::vector<std::vector<cmGeneratorExpressionEvaluator*> > ParamChildren;
- const char *StartContent;
+ const char* StartContent;
size_t ContentLength;
};