Created
January 28, 2018 02:55
-
-
Save LiewJunTung/73a0b75625a0e994d0e780938b4de62c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "calculator_impl.hpp" | |
#include <string> | |
namespace calculator{ | |
std::shared_ptr<Calculator> Calculator::create() { | |
return std::make_shared<CalculatorImpl>(); | |
} | |
CalculatorImpl::CalculatorImpl() {} | |
int32_t CalculatorImpl::summation(int32_t number1, int32_t number2) { | |
int32_t result = number1 + number2; | |
return result; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include "calculator.hpp" | |
namespace calculator { | |
class CalculatorImpl : public calculator::Calculator { | |
public: | |
CalculatorImpl(); | |
int32_t summation(int32_t number1, int32_t number2); | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment