Classes | Namespaces | Defines | Enumerations | Functions
hayai_main.hpp File Reference
#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <errno.h>
#include <fstream>
#include <set>
#include <vector>
#include "hayai/hayai.hpp"
Include dependency graph for hayai_main.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  hayai::FileOutputter
 File outputter. More...
class  hayai::MainRunner
 Default main executable runner for Hayai. More...

Namespaces

namespace  hayai

Defines

#define ADD_OUTPUTTER(_prefix)
#define FILE_OUTPUTTER_IMPLEMENTATION(_prefix)
#define HAYAI_MAIN_FORMAT_ARGUMENT(_desc)   ::hayai::Console::TextYellow << _desc << ::hayai::Console::TextDefault
#define HAYAI_MAIN_FORMAT_ERROR(_desc)
#define HAYAI_MAIN_FORMAT_FLAG(_desc)   ::hayai::Console::TextGreen << _desc << ::hayai::Console::TextDefault
#define HAYAI_MAIN_USAGE_ERROR(_desc)
#define PATH_SEPARATOR   '/'

Enumerations

enum  hayai::MainExecutionMode { hayai::MainRunBenchmarks, hayai::MainListBenchmarks }
 Execution mode. More...

Functions

 hayai::FILE_OUTPUTTER_IMPLEMENTATION (Json)
 hayai::FILE_OUTPUTTER_IMPLEMENTATION (Console)
 hayai::FILE_OUTPUTTER_IMPLEMENTATION (JUnitXml)

Define Documentation

#define ADD_OUTPUTTER (   _prefix)
Value:
{                                                   \
                        if (path)                                       \
                            FileOutputters.push_back(                   \
                                new ::hayai::_prefix ## FileOutputter(path) \
                            );                                          \
                        else                                            \
                        {                                               \
                            if (StdoutOutputter)                        \
                                delete StdoutOutputter;                 \
                            StdoutOutputter =                           \
                                new ::hayai::_prefix ## Outputter(std::cout); \
                        }                                               \
                    }
#define FILE_OUTPUTTER_IMPLEMENTATION (   _prefix)
Value:
class _prefix ## FileOutputter                                      \
        :   public FileOutputter                                        \
    {                                                                   \
    public:                                                             \
        _prefix ## FileOutputter(const char* path)                      \
            :   FileOutputter(path)                                     \
        {}                                                              \
    protected:                                                          \
        virtual ::hayai::Outputter* CreateOutputter(std::ostream& stream) \
        {                                                               \
            return new ::hayai::_prefix ## Outputter(stream);           \
        }                                                               \
    }

Definition at line 124 of file hayai_main.hpp.

Definition at line 24 of file hayai_main.hpp.

#define HAYAI_MAIN_FORMAT_ERROR (   _desc)
Value:

Definition at line 26 of file hayai_main.hpp.

Definition at line 22 of file hayai_main.hpp.

#define HAYAI_MAIN_USAGE_ERROR (   _desc)
Value:
{                                                                   \
        std::cerr << HAYAI_MAIN_FORMAT_ERROR(_desc) << std::endl        \
                  << std::endl;                                         \
        ShowUsage(argv[0]);                                             \
        return EXIT_FAILURE;                                            \
    }

Definition at line 29 of file hayai_main.hpp.

#define PATH_SEPARATOR   '/'

Definition at line 18 of file hayai_main.hpp.



hayai
Author(s): Nick Bruun
autogenerated on Thu Jun 6 2019 18:13:43