Commit ac58704c authored by Tomáš Jakubec's avatar Tomáš Jakubec
Browse files

DBG fix

parent 63f9c882
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -4,5 +4,4 @@ CONFIG -= app_bundle
CONFIG -= qt
CONFIG -= qt


SOURCES += \
SOURCES += \
        ../debug/debug.cpp \
        main.cpp
        main.cpp
+17 −15
Original line number Original line Diff line number Diff line
#include "../debug/Debug.h"
#include "../src/Debug/Debug.h"
#include "../Unstructured_mesh/UnstructuredMesh/UnstructuredMesh.h"
#include "../src/UnstructuredMesh/UnstructuredMesh.h"
#include "../Unstructured_mesh/UnstructuredMesh/MeshDataContainer/MemberApproach.h"
#include "../src/Traits/MemberApproach/MemberApproach.h"
#include "../Unstructured_mesh/UnstructuredMesh/MeshDataContainer/Traits.h"
#include "../src/Traits/Traits.h"
#include <functional>
#include <functional>
#include <type_traits>
#include <type_traits>
#include <iostream>
#include <iostream>
@@ -69,18 +69,20 @@ void testDebug() {
    Vertex<7, double> vert;
    Vertex<7, double> vert;
    DBGVAR(vert, vert.getCoordinates());
    DBGVAR(vert, vert.getCoordinates());


    DBGVAR((Detail::is_exportable<decltype(vec)>::value));
    DBGVAR((IsExportable<decltype(vec)>::value));


    DBGVAR((Detail::is_exportable<double>::value));
    DBGVAR((IsExportable<double>::value));


    DBGVAR(Detail::is_indexable<double>::value);
    DBGVAR(IsIndexable<double>::value);


    DBGVAR(Detail::is_indexable<decltype(vec)>::value);
    DBGVAR(IsIndexable<decltype(vec)>::value);


    DBGVAR(Detail::is_indexable<decltype(vert)>::value);
    DBGVAR(IsIndexable<decltype(vert)>::value);


    Subelement<size_t> s({1});
    Subelement<size_t> s({1});
    DBGVAR(s);
    DBGVAR(s);
    //auto v = {1,2,3};
    //DBGVAR(v);


    HTMLDBGVAR(r, i, c, list, vec, b, m);
    HTMLDBGVAR(r, i, c, list, vec, b, m);


@@ -92,7 +94,7 @@ void testDebug() {
//The concept implementation
//The concept implementation
template<typename T>
template<typename T>
class NeedIterator{
class NeedIterator{
    static_assert (Detail::is_iterable<T>::value, "The type must be iterable");
    static_assert (IsIterable<T>::value, "The type must be iterable");
public:
public:
    NeedIterator(const T&){}
    NeedIterator(const T&){}
};
};
@@ -301,7 +303,7 @@ void testMemberRef(){
    Traits<tempData>::ttype::getReference<1>()->setValue(&d, {42.15,84.30,42.15});
    Traits<tempData>::ttype::getReference<1>()->setValue(&d, {42.15,84.30,42.15});


    DBGVAR(Traits<tempData>::ttype::getName<0>(),(Traits<tempData>::ttype::getReference<0>()->getValue(&d)), Traits<tempData>::ttype::getName<1>(),(Traits<tempData, double, Vector<3,double>>::getReference<1>()->getValue(&d)), d.velocity);
    DBGVAR(Traits<tempData>::ttype::getName<0>(),(Traits<tempData>::ttype::getReference<0>()->getValue(&d)), Traits<tempData>::ttype::getName<1>(),(Traits<tempData, double, Vector<3,double>>::getReference<1>()->getValue(&d)), d.velocity);
    DBGVAR(Traits<tempData>::is_specialized,Detail::has_default_traits<tempData>::value, d);
    DBGVAR(Traits<tempData>::is_specialized,HasDefaultTraits<tempData>::value, d);


    ExportTest e;
    ExportTest e;
    DBGVAR(e, ClassC<>());
    DBGVAR(e, ClassC<>());
@@ -312,7 +314,7 @@ void testMemberRef(){






#include "../Unstructured_mesh/UnstructuredMesh/MeshDataContainer/Singleton.h"
#include "../src/Singleton/Singleton.h"
/*
/*
Test of order of constructors
Test of order of constructors
*/
*/
@@ -548,11 +550,11 @@ void testFunction() {


int main()
int main()
{
{

    testDebug();
    //testOperator();
    //testOperator();
    //testMemberRef();
    testMemberRef();
    //testConstrucorOrder();
    //testConstrucorOrder();
    testFunction();
    //testFunction();
    return 0;
    return 0;
}
}


+1 −1
Original line number Original line Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.10.0, 2019-11-20T00:19:29. -->
<!-- Written by QtCreator 4.10.0, 2019-11-20T11:13:14. -->
<qtcreator>
<qtcreator>
 <data>
 <data>
  <variable>EnvironmentId</variable>
  <variable>EnvironmentId</variable>
+1 −1
Original line number Original line Diff line number Diff line
#include <iostream>
#include <iostream>
//#define UNDEBUG
//#define UNDEBUG
//#define CONSOLE_COLOURED_OUTPUT
#define CONSOLE_COLOURED_OUTPUT
#include "../src/Debug/Debug.h"
#include "../src/Debug/Debug.h"
#include "../src/UnstructuredMesh/UnstructuredMesh.h"
#include "../src/UnstructuredMesh/UnstructuredMesh.h"
#include "../src/UnstructuredMesh/MeshFunctions/MeshFunctions.h"
#include "../src/UnstructuredMesh/MeshFunctions/MeshFunctions.h"
+2 −2
Original line number Original line Diff line number Diff line
@@ -47,7 +47,7 @@ public:
#ifdef CONSOLE_COLOURED_OUTPUT
#ifdef CONSOLE_COLOURED_OUTPUT
#ifdef _WIN32
#ifdef _WIN32
        HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
        HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
        std::cerr << "In file " << cppFile << " at line " << line << " variable " << name << " has value of ";
        std::cerr << "In file " << cppFile << " at line " << line << " variable ";
        SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
        SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
        std::cerr << name;
        std::cerr << name;
        SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
        SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
@@ -75,7 +75,7 @@ public:
#ifdef CONSOLE_COLOURED_OUTPUT
#ifdef CONSOLE_COLOURED_OUTPUT
#ifdef _WIN32
#ifdef _WIN32
        HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
        HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
        std::cerr << "In file " << cppFile << " at line " << line << " variable " << name << " has value of ";
        std::cerr << "In file " << cppFile << " at line " << line << " variable ";
        SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
        SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_INTENSITY);
        std::cerr << name;
        std::cerr << name;
        SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
        SetConsoleTextAttribute(hConsole, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
Loading