diff options
| author | Charles Cabergs <me@cacharle.xyz> | 2020-11-12 10:54:47 +0100 |
|---|---|---|
| committer | Charles Cabergs <me@cacharle.xyz> | 2020-11-12 10:54:47 +0100 |
| commit | 96dcf214a8c40529b251ea31ef037868583dd1da (patch) | |
| tree | ecbb74fd1982829b550f5b5f5451497245db1358 /cpp06/ex00/DynamicConverter.cpp | |
| parent | 2e0cf63a219d24ef07412deca9b0e6cb02882b46 (diff) | |
| download | piscine_cpp-96dcf214a8c40529b251ea31ef037868583dd1da.tar.gz piscine_cpp-96dcf214a8c40529b251ea31ef037868583dd1da.tar.bz2 piscine_cpp-96dcf214a8c40529b251ea31ef037868583dd1da.zip | |
Fixing cpp03, moved more common logic in ClapTrap, Added better main
Diffstat (limited to 'cpp06/ex00/DynamicConverter.cpp')
| -rw-r--r-- | cpp06/ex00/DynamicConverter.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/cpp06/ex00/DynamicConverter.cpp b/cpp06/ex00/DynamicConverter.cpp deleted file mode 100644 index c22d469..0000000 --- a/cpp06/ex00/DynamicConverter.cpp +++ /dev/null @@ -1,51 +0,0 @@ -/* ************************************************************************** */ -/* */ -/* ::: :::::::: */ -/* DynamicConverter.cpp :+: :+: :+: */ -/* +:+ +:+ +:+ */ -/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */ -/* +#+#+#+#+#+ +#+ */ -/* Created: 2020/04/16 11:48:33 by charles #+# #+# */ -/* Updated: 2020/04/16 12:25:58 by charles ### ########.fr */ -/* */ -/* ************************************************************************** */ - -#include "DynamicConverter.hpp" - -DynamicConverter(DynamicConverter const& other) -{ - *this = other; -} - -DynamicConverter& operator=(DynamicConverter const& other) -{ - if (*this == other) - return *this; - m_origin = other.m_origin; - m_type = other.m_type; - m_int = other.m_int; - m_char = other.m_char; - m_float = other.m_float; - m_double = other.m_double; - return *this; -} - -~DynamicConverter() -{} - -DynamicConverter(std::string const& origin) - : m_origin(origin) -{ - if (isCharLitteral(origin)) - m_type = DetectedTypeChar; - else if (isIntLitteral(origin)) - else if (isFloatLitteral(origin)) - else if (isDoubleLitteral(origin)) - - -} - -bool isCharLitteral(std::string const& s) -{ - if (!origin.length() == 3 && origin[0] == '\'' && origin[2] == '\''); -} |
