-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInt16.hpp
52 lines (40 loc) · 1.76 KB
/
Int16.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* Int16.hpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: ckatz <[email protected]> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2018/07/06 12:18:47 by ckatz #+# #+# */
/* Updated: 2018/07/09 16:18:57 by ckatz ### ########.fr */
/* */
/* ************************************************************************** */
#ifndef INT16_HPP
#define INT16_HPP
#include "IOperand.hpp"
#include "OperandFactory.hpp"
#include <iostream>
#include <string>
#include <sstream>
#include <cmath>
class Int16: public IOperand
{
public:
Int16(void);
Int16(const std::string numAsString, eOperandType type);
Int16(Int16 const & src);
~Int16(void);
virtual int getPrecision(void) const;
virtual eOperandType getType(void) const;
virtual IOperand const * operator+(IOperand const & rhs) const;
virtual IOperand const * operator-(IOperand const & rhs) const;
virtual IOperand const * operator*(IOperand const & rhs) const;
virtual IOperand const * operator/(IOperand const & rhs) const;
virtual IOperand const * operator%(IOperand const & rhs) const;
virtual std::string const & toString( void ) const;
Int16 & operator=(Int16 const & src);
private:
std::string _value;
eOperandType _type;
};
#endif