Skip to content
Baptiste Thémine edited this page Jun 13, 2020 · 10 revisions
#include <JLC/JLC.h>

Description

Includes JLC and required standard librairies.

JLC.h enables every features of JLC according to C++ language version and defines them into namespace JLC. You also have the possibility to include only a subset of JLC by including each file individually in which case you will need to include prerequired files in order to enable their features. Every JLC files define their own namespace and they can be safely included inside another namespace.

Requirements

<functional>, <initializer_list> and <regex> features are enabled from C++11.

Implementation

#ifndef JLC_H
#define JLC_H

//C headers
#include <cctype>
#include <cstdarg>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

//C++ headers
#include <iostream>
#include <iterator>
#include <stdexcept>
#if __cplusplus >= 201103L
#include <functional>
#include <initializer_list>
#include <regex>
#endif

//JLC headers
namespace JLC {
#include "debug.h"
#include "functions.h"
#include "array.h"
#include "calendar.h"
#include "collection.h"
#include "containers.h"
#include "list.h"
#include "map.h"
#include "queue.h"
#include "range.h"
#include "set.h"
#include "stack.h"
#include "stream.h"
#include "string.h"
} namespace jlc = JLC;

#endif //JLC_H

Examples

Enable every features of JLC

#include <JLC/JLC.h>
using namespace JLC;

int main(){
    String str = "Hello Github !";
    std::cout << str << std::endl;
}

OR enable only minimal requirement for string.

#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <iterator>
#include <stdexcept>
#include <JLC/debug.h>
#include <JLC/functions.h>
#include <JLC/string.h>

int main(){
    String str = "Hello Github !";
    std::cout << str << std::endl;
}
Hello Github !
Clone this wiki locally