/*
   HARK Library
   Copyright (C) 2021 Honda Research Institute Japan Inc.
 */

#if !defined(_HARKLIB_HARKLIB_H_INCLUDED_)
#define _HARKLIB_HARKLIB_H_INCLUDED_ 1

/* check c++ standard */
#if __cplusplus < 201103L
#error HARK Library requires c++11 or later.
#endif

#if defined(_WIN32) || defined(_WIN64)
#define HARKLIB_PLATFORM_TYPE_WINDOWS 1
#elif defined(__APPLE__)
#define HARKLIB_PLATFORM_TYPE_MACOS 1
#elif defined(__linux__)
#define HARKLIB_PLATFORM_TYPE_LINUX 1
#else
#error Failed to find platform type
#endif

#if defined(HARKLIB_PLATFORM_TYPE_WINDOWS)
#define _USE_MATH_DEFINES
#endif

#if defined(HARKLIB_PLATFORM_TYPE_LINUX)
#define HARKLIB_MOSQUITTO_AVAILABLE 0 // 1
#else
#define HARKLIB_MOSQUITTO_AVAILABLE 0
#endif

#if defined(HARKLIB_PLATFORM_TYPE_WINDOWS)
#pragma warning(disable: 4819)
#endif

#include <memory>
#include <iostream>

namespace hark
{
    class Terminal;
    class NodeDef;
    class NetworkDef;
    // class IteratorNetwork;
    // class Task;
    class Input;
    class AsyncInput;

    // class DataStream;
    class DataBundle;
    // class DataQueue;
    // class DataPacket;

    class DataSource;
    class DataSourceMap;
    class DataSink;
    class DataSinkMap;
    class DataProxy;
    class DataProxyMap;
    class DataProxyFactory;

    // class Builder;
    class BaseNode;
    class Node;
    class Network;

    // class NodeDef;
    // class NetworkDef;
    // class NodeRef;
    // class BaseNetwork;
    using InputDataBundle = DataSourceMap;
    using OutputDataBundle = DataSinkMap;

    // template<typename N> class Network;
namespace dispatch{
    class Scheduler;
    class BaseDispatcher;
}

    // class TRACE {
    // public:
    //     TRACE(){ std::cout << "TRACE: ctor: this=" << (void *)this << std::endl; }
    //     virtual ~TRACE(){ std::cout << "TRACE: dtor: this=" << (void *)this << std::endl; }
    //
    // public:
    //     bool read(char buf[], size_t size);
    // };

    class Thread;
    class Mutex;
    class ConditionVariable;
}

// for debug
// #define VERBOSE_DEBUG 1

#endif /* #if !defined(_HARKLIB_HARKLIB_H_INCLUDED_) */

/* end of file */
