This is Ahmet from Turkey, i love programing, tech, and such as things. I had try creating simple and special things and i'm trying. Cause thats the life, we going to die and we try to leave some things to behind us.
class IMail() {
public:
virtual string GetSender() = 0;
virtual string GetTopic() = 0;
virtual string GetContext() = 0;
};
class IMailResult {
public:
virtual bool IsSuccess() = 0;
};
class MailClientBase {
protected:
virtual bool Auth(string host, uint16_t port, string address, string password);
virtual IMailResult Send(MailBaseClass mail);
};
class YourMailClient : protected MailClientBase { ... };
class YourMail : public IMail { ... };
assert(!(
new YourMailClient("fooBoo", "123456")
->Send(new YourMail("[email protected]", "", nullptr))
->IsSuccess()
)
);
return 0;