mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-08 22:08:29 -05:00
41 lines
1.5 KiB
C++
41 lines
1.5 KiB
C++
#include "SimpleMatcherFactory.h"
|
|
|
|
#include "SimpleMatcherCharacter.h"
|
|
#include "SimpleMatcherKeyword.h"
|
|
#include "SimpleMatcherValueType.h"
|
|
|
|
SimpleMatcherFactory::SimpleMatcherFactory(const IMatcherForLabelSupplier<SimpleParserValue>* labelSupplier)
|
|
: AbstractMatcherFactory(labelSupplier)
|
|
{
|
|
}
|
|
|
|
MatcherFactoryWrapper<SimpleParserValue> SimpleMatcherFactory::Type(SimpleParserValueType type) const
|
|
{
|
|
return MatcherFactoryWrapper<SimpleParserValue>(std::make_unique<SimpleMatcherValueType>(type));
|
|
}
|
|
|
|
MatcherFactoryWrapper<SimpleParserValue> SimpleMatcherFactory::Keyword(std::string value) const
|
|
{
|
|
return MatcherFactoryWrapper<SimpleParserValue>(std::make_unique<SimpleMatcherKeyword>(std::move(value)));
|
|
}
|
|
|
|
MatcherFactoryWrapper<SimpleParserValue> SimpleMatcherFactory::Identifier() const
|
|
{
|
|
return MatcherFactoryWrapper<SimpleParserValue>(std::make_unique<SimpleMatcherValueType>(SimpleParserValueType::IDENTIFIER));
|
|
}
|
|
|
|
MatcherFactoryWrapper<SimpleParserValue> SimpleMatcherFactory::Integer() const
|
|
{
|
|
return MatcherFactoryWrapper<SimpleParserValue>(std::make_unique<SimpleMatcherValueType>(SimpleParserValueType::INTEGER));
|
|
}
|
|
|
|
MatcherFactoryWrapper<SimpleParserValue> SimpleMatcherFactory::FloatingPoint() const
|
|
{
|
|
return MatcherFactoryWrapper<SimpleParserValue>(std::make_unique<SimpleMatcherValueType>(SimpleParserValueType::FLOATING_POINT));
|
|
}
|
|
|
|
MatcherFactoryWrapper<SimpleParserValue> SimpleMatcherFactory::Char(char c) const
|
|
{
|
|
return MatcherFactoryWrapper<SimpleParserValue>(std::make_unique<SimpleMatcherCharacter>(c));
|
|
}
|