Commit de402313563aab06d0e0133200184b9555bcf976

Authored by Peter M. Groen
1 parent 7efe8c10

Implementation of Constructors

.gitignore
1 1 /submodules/cmake/
2 2 /.gitmodules
  3 +./build/
  4 +build/
... ...
src/CMakeLists.txt 0 โ†’ 100644
  1 +cmake_minimum_required(VERSION 3.14)
  2 +LIST(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/submodules/cmake)
  3 +include(projectheader)
  4 +project_header(datatypes)
  5 +
  6 +find_package( Qt5Core REQUIRED )
  7 +find_package( Qt5Sql REQUIRED )
  8 +
  9 +include(artifacts)
  10 +
  11 +#include_directories( SYSTEM
  12 +# ${Qt5Core_INCLUDE_DIRS}
  13 +# ${Qt5Sql_INCLUDE_DIRS}
  14 +#)
  15 +
  16 +include(compiler)
  17 +
  18 +#include_directories(
  19 +#)
  20 +
  21 +set(SRC_LIST
  22 + ${CMAKE_CURRENT_SOURCE_DIR}/Variant.h
  23 + ${CMAKE_CURRENT_SOURCE_DIR}/Variant.cpp
  24 +)
  25 +
  26 +#link_directories(
  27 +# ${CMAKE_BINARY_DIR}/lib
  28 +#)
  29 +
  30 +include(library)
  31 +add_libraries(
  32 +)
  33 +
  34 +include(installation)
  35 +install_component()
... ...
src/Variable.cpp deleted
src/Variable.h deleted
src/Variant.cpp 0 โ†’ 100644
  1 +#include "Variant.h"
  2 +
  3 +using namespace osdev::components;
  4 +
  5 +Variant::Variant()
  6 +{
  7 +}
  8 +
  9 +Variant::Variant(Type type)
  10 +{
  11 +}
  12 +
  13 +Variant::Variant(bool value)
  14 +{
  15 +}
  16 +
  17 +Variant::Variant(int value)
  18 +{
  19 +}
  20 +
  21 +Variant::Variant(uint value)
  22 +{
  23 +}
  24 +
  25 +Variant::Variant(double value)
  26 +{
  27 +}
  28 +
  29 +Variant::Variant(float value)
  30 +{
  31 +}
  32 +
  33 +Variant::Variant(char value)
  34 +{
  35 +}
  36 +
  37 +Variant::Variant(std::string value)
  38 +{
  39 +}
  40 +
  41 +Variant::Variant(uint8_t value)
  42 +{
  43 +}
  44 +
  45 +Variant::Variant(uint16_t value)
  46 +{
  47 +}
  48 +
  49 +Variant::Variant(uint32_t value)
  50 +{
  51 +}
  52 +
  53 +Variant::Variant(uint64_t value)
  54 +{
  55 +}
  56 +
  57 +Variant::Variant(int8_t value)
  58 +{
  59 +}
  60 +
  61 +Variant::Variant(int16_t value)
  62 +{
  63 +}
  64 +
  65 +Variant::Variant(int32_t value)
  66 +{
  67 +}
  68 +
  69 +Variant::Variant(int64_t value)
  70 +{
  71 +}
  72 +
... ...
src/Variant.h 0 โ†’ 100644
  1 +#pragma one
  2 +
  3 +#include <string>
  4 +namespace osdev::components {
  5 +class Variant
  6 +{
  7 +public:
  8 + enum Type {
  9 + Invalid, // Unknown
  10 + Bool, // bool
  11 + Int, // int (standard)
  12 + UInt, // Unsigned int
  13 + Double, // double
  14 + Float, // float
  15 + Char, // char
  16 + String, // std::string
  17 + UInt8, // uint8_t
  18 + UInt16, // uint16_t
  19 + UInt32, // uint32_t
  20 + UInt64, // uint64_t
  21 + Int8, // int8_t
  22 + Int16, // int16_t
  23 + Int32, // int32_t
  24 + Int64 // int64_t
  25 + };
  26 +
  27 + /*!
  28 + * All Constructors available
  29 + */
  30 + Variant();
  31 + Variant(Type type);
  32 + Variant(bool value);
  33 + Variant(int value);
  34 + Variant(uint value);
  35 + Variant(double value);
  36 + Variant(float value);
  37 + Variant(char value);
  38 + Variant(std::string value);
  39 + Variant(uint8_t value);
  40 + Variant(uint16_t value);
  41 + Variant(uint32_t value);
  42 + Variant(uint64_t value);
  43 + Variant(int8_t value);
  44 + Variant(int16_t value);
  45 + Variant(int32_t value);
  46 + Variant(int64_t value);
  47 +
  48 +
  49 +};
  50 +
  51 +} /* End namespace osdev::components */
0 52 \ No newline at end of file
... ...