diff --git a/alib2std/src/compare b/alib2std/src/compare index 9a9cd74051ed629c3fe132c52e414941c867d40b..0a71d66a08937e3727b5a0402581d40f9300b8f2 100644 --- a/alib2std/src/compare +++ b/alib2std/src/compare @@ -1,6 +1,7 @@ #ifndef __COMPARE_HEADER_WRAPPER_ #define __COMPARE_HEADER_WRAPPER_ +#include "utility" #include "extensions/compare.hpp" #endif /* __COMPARE_HEADER_WRAPPER_ */ diff --git a/alib2std/src/extensions/algorithm.hpp b/alib2std/src/extensions/algorithm.hpp index bce3c60d257f44bfc22bc806b3031b95103cd35c..67abc2a7401a16a6e92cfddedaffa4cb1876b8cf 100644 --- a/alib2std/src/extensions/algorithm.hpp +++ b/alib2std/src/extensions/algorithm.hpp @@ -5,8 +5,8 @@ * Author: Jan Travnicek */ -#ifndef ALGORITHM_HPP_ -#define ALGORITHM_HPP_ +#ifndef __ALGORITHM_HPP_ +#define __ALGORITHM_HPP_ namespace std { @@ -48,4 +48,4 @@ bool binary_contains(InputIt first, InputIt last, const Element& elem) { } /* namespace std */ -#endif /* ALGORITHM_HPP_ */ +#endif /* __ALGORITHM_HPP_ */ diff --git a/alib2std/src/extensions/clone.hpp b/alib2std/src/extensions/clone.hpp index 2495e60a443080774767e2938f8f8861a31ffbd6..4f7d0921583f1c7cb7c75c0d59d4488a026b4b9a 100644 --- a/alib2std/src/extensions/clone.hpp +++ b/alib2std/src/extensions/clone.hpp @@ -5,8 +5,8 @@ * Author: Jan Travnicek */ -#ifndef CLONE_HPP_ -#define CLONE_HPP_ +#ifndef __CLONE_HPP_ +#define __CLONE_HPP_ namespace std { @@ -22,4 +22,4 @@ T* clone(const T * const tmp) { } /* namespace std */ -#endif /* CLONE_HPP_ */ +#endif /* __CLONE_HPP_ */ diff --git a/alib2std/src/extensions/compare.hpp b/alib2std/src/extensions/compare.hpp index f92be80ef7241f9807e724fce426a5f727709b58..19e0c9c18557bd2044370c51243bfe4442b3bf8c 100644 --- a/alib2std/src/extensions/compare.hpp +++ b/alib2std/src/extensions/compare.hpp @@ -5,10 +5,8 @@ * Author: Jan Travnicek */ -#ifndef COMPARE_HPP_ -#define COMPARE_HPP_ - -#include <utility> +#ifndef __COMPARE_HPP_ +#define __COMPARE_HPP_ namespace std { @@ -46,4 +44,4 @@ struct compare<T*> { } /* namespace std */ -#endif /* COMPARE_HPP_ */ +#endif /* __COMPARE_HPP_ */ diff --git a/alib2std/src/extensions/fdstream.cpp b/alib2std/src/extensions/fdstream.cpp index 210c807512d1f08da9086ab674ef06a933e5caea..909348f3b429fb8060889e3e07871039270d4a4e 100644 --- a/alib2std/src/extensions/fdstream.cpp +++ b/alib2std/src/extensions/fdstream.cpp @@ -1,8 +1,11 @@ /* + * fdstream.cpp + * + * Created on: Feb 12, 2016 * Author: Radovan Cerveny */ -#include "fdstream.hpp" +#include <fdstream> namespace std { @@ -121,4 +124,4 @@ bool ifdstream::is_redirected ( ) const { return fda.is_redirected ( ); } -} +} /* namespace std */ diff --git a/alib2std/src/extensions/fdstream.hpp b/alib2std/src/extensions/fdstream.hpp index 20c5677bd71e3a072f629df18660680e3f48c20b..cd67438431dd409fecb5005a7d2a7902a2d57ab7 100644 --- a/alib2std/src/extensions/fdstream.hpp +++ b/alib2std/src/extensions/fdstream.hpp @@ -1,4 +1,7 @@ /* + * fdstream.hpp + * + * Created on: Feb 12, 2016 * Author: Radovan Cerveny */ @@ -14,14 +17,8 @@ * typical use is to use as primary fd some arbitrary fd (5) and for fallback fd some standard fd (2) if we wish to see the output */ -#ifndef FDSTREAM_HPP_ -#define FDSTREAM_HPP_ - -#include <unistd.h> -#include <fcntl.h> -#include <ostream> -#include <istream> -#include <array> +#ifndef __FDSTREAM_HPP_ +#define __FDSTREAM_HPP_ namespace std { @@ -79,6 +76,6 @@ public: bool is_redirected ( ) const; }; -} +} /* namespace std */ -#endif /* FDSTREAM_HPP_ */ +#endif /* __FDSTREAM_HPP_ */ diff --git a/alib2std/src/extensions/hexavigesimal.cpp b/alib2std/src/extensions/hexavigesimal.cpp index 836481746762dc9c5d56b77f5015121c39477254..5906bd373d5991f3c12386815cf9b61b2a489f4d 100644 --- a/alib2std/src/extensions/hexavigesimal.cpp +++ b/alib2std/src/extensions/hexavigesimal.cpp @@ -5,7 +5,7 @@ * Author: Tomas Pecka */ -#include "../hexavigesimal" +#include <hexavigesimal> #include <stdexcept> namespace std { @@ -53,4 +53,4 @@ string bijectiveToBase26(unsigned n) { return string(name.rbegin(), name.rend()); } -} /* namespace conversions */ +} /* namespace std */ diff --git a/alib2std/src/extensions/hexavigesimal.h b/alib2std/src/extensions/hexavigesimal.h index 91f5d2369d786f71265f332ae01ecdff713442b2..9e74f19cb847760255a80c1224d0aed925e5e91c 100644 --- a/alib2std/src/extensions/hexavigesimal.h +++ b/alib2std/src/extensions/hexavigesimal.h @@ -5,10 +5,8 @@ * Author: Tomas Pecka */ -#ifndef HEXAVIGESIMAL_H_ -#define HEXAVIGESIMAL_H_ - -#include <string> +#ifndef __HEXAVIGESIMAL_H_ +#define __HEXAVIGESIMAL_H_ namespace std { @@ -38,4 +36,4 @@ unsigned bijectiveFromBase26( string rep ); } /* namespace std */ -#endif /* HEXAVIGESIMAL_H_ */ +#endif /* __HEXAVIGESIMAL_H_ */ diff --git a/alib2std/src/extensions/iostream.cpp b/alib2std/src/extensions/iostream.cpp index 2c45e69254c4578d41950865612429c8eb7365c4..7e9165729206a896f0eb11ffd146783d9a74f068 100644 --- a/alib2std/src/extensions/iostream.cpp +++ b/alib2std/src/extensions/iostream.cpp @@ -1,9 +1,11 @@ /* + * iostream.cpp + * + * Created on: Feb 12, 2016 * Author: Radovan Cerveny */ -#include "iostream.hpp" -#include <bits/../iostream> +#include <iostream> namespace std { @@ -11,9 +13,12 @@ const int CERR_FD = 2; // used for measurements output const int CMEASURE_FD = 5; + ofdstream cmeasure ( CMEASURE_FD, CERR_FD ); + // used for logging const int CLOG_FD = 4; + fdaccessor clog_fdaccessor ( CLOG_FD, CERR_FD ); fdstreambuf clog_fdstreambuf ( clog_fdaccessor.get_fd ( ) ); @@ -27,4 +32,5 @@ RelinkIO::~RelinkIO ( ) { } RelinkIO relinkio; -} + +} /* namespace std */ diff --git a/alib2std/src/extensions/iostream.hpp b/alib2std/src/extensions/iostream.hpp index 1f0dc060795d7066e5fe5dd3c373f788a0ed7f78..406e8285b8146bafcd1427f6f33e5dee1e809a2f 100644 --- a/alib2std/src/extensions/iostream.hpp +++ b/alib2std/src/extensions/iostream.hpp @@ -1,11 +1,12 @@ /* + * iostream.hpp + * + * Created on: Feb 12, 2016 * Author: Radovan Cerveny */ -#ifndef IOSTREAM_HPP_ -#define IOSTREAM_HPP_ - -#include "fdstream.hpp" +#ifndef __IOSTREAM_HPP_ +#define __IOSTREAM_HPP_ namespace std { @@ -28,4 +29,4 @@ public: extern RelinkIO relinkio; } -#endif /* IOSTREAM_HPP_ */ +#endif /* __IOSTREAM_HPP_ */ diff --git a/alib2std/src/extensions/istream.cpp b/alib2std/src/extensions/istream.cpp index 0d96eeae88e3e4bc0147ea99da971096a12bd8c6..f4ade8e0e585ceafd2f782cc530599b4d5dae654 100644 --- a/alib2std/src/extensions/istream.cpp +++ b/alib2std/src/extensions/istream.cpp @@ -5,7 +5,9 @@ * Author: Jan Travnicek */ -#include "../istream" +#include <istream> + +namespace std { std::istream & oprr ( std::istream & in, const std::string & str, bool start ) { if ( str.size ( ) == 0 ) return in; @@ -35,3 +37,5 @@ std::istream & oprr ( std::istream & in, const std::string & str, bool start ) { std::istream & operator >>( std::istream & in, const std::string & str ) { return oprr ( in, str, true ); } + +} /* namespace std */ diff --git a/alib2std/src/extensions/istream.h b/alib2std/src/extensions/istream.h index 2fad59c8eb8b511696cc1439630b984de127ad9e..90e6d41adde7e629c5dfce218ee392e74ce0b058 100644 --- a/alib2std/src/extensions/istream.h +++ b/alib2std/src/extensions/istream.h @@ -1,15 +1,17 @@ /* - * istream.hpp + * istream.h * * Created on: Apr 1, 2013 * Author: Jan Travnicek */ -#ifndef ISTREAM_H_ -#define ISTREAM_H_ +#ifndef __ISTREAM_H_ +#define __ISTREAM_H_ -#include <string> +namespace std { std::istream& operator>>(std::istream& in, const std::string& str); -#endif +} /* namespace std */ + +#endif /* __ISTREAM_H_ */ diff --git a/alib2std/src/extensions/map.hpp b/alib2std/src/extensions/map.hpp index b2d0f167399f984956a7bf7193f1683cffd419be..bad2a627512e807e93315a7c8b5172722e505dd8 100644 --- a/alib2std/src/extensions/map.hpp +++ b/alib2std/src/extensions/map.hpp @@ -8,8 +8,6 @@ #ifndef __MAP_HPP_ #define __MAP_HPP_ -#include "pair.hpp" - namespace std { template< class T, class R, class ... Ts > diff --git a/alib2std/src/extensions/memory.hpp b/alib2std/src/extensions/memory.hpp index f9361058799da49c20c3712d726f987f1cb0b65f..31c0f82664cbd3666a2f98f242aabd2cc6811722 100644 --- a/alib2std/src/extensions/memory.hpp +++ b/alib2std/src/extensions/memory.hpp @@ -1,5 +1,12 @@ -#ifndef _MEMORY_HPP__ -#define _MEMORY_HPP__ +/* + * memoru.hpp + * + * Created on: May 1, 2015 + * Author: Jan Travnicek + */ + +#ifndef __MEMORY_HPP_ +#define __MEMORY_HPP_ namespace std { @@ -422,4 +429,4 @@ std::smart_ptr < T > make_smart ( Args && ... args ) { } /* namespace std */ -#endif // _MEMORY_HPP__ +#endif /* __MEMORY_HPP_ */ diff --git a/alib2std/src/extensions/random.cpp b/alib2std/src/extensions/random.cpp index edcbe7ee04408c338a10c4fd18fa2d5cfe5bfb43..fc77f92466d69f81d04ab4b70305035c32cd08fb 100644 --- a/alib2std/src/extensions/random.cpp +++ b/alib2std/src/extensions/random.cpp @@ -1,15 +1,15 @@ /* - * istream.cpp + * random.cpp * * Created on: Apr 1, 2013 * Author: Jan Travnicek */ -#include "../random" +#include <random> namespace std { random_device random_devices::random; random_devices::semirandom_device random_devices::semirandom; -} +} /* namespace std */ diff --git a/alib2std/src/extensions/random.hpp b/alib2std/src/extensions/random.hpp index fd1aa0f96598dfa31d9458516e9549586272ac4e..a961a927b3114da0aaa1f3993edef2d5489e6713 100644 --- a/alib2std/src/extensions/random.hpp +++ b/alib2std/src/extensions/random.hpp @@ -5,8 +5,8 @@ * Author: Jan Travnicek */ -#ifndef RANDOM_HPP_ -#define RANDOM_HPP_ +#ifndef __RANDOM_HPP_ +#define __RANDOM_HPP_ namespace std { @@ -46,4 +46,4 @@ public: } /* namespace std */ -#endif /* ALGORITHM_HPP_ */ +#endif /* _RANDOM_HPP_ */ diff --git a/alib2std/src/extensions/string.cpp b/alib2std/src/extensions/string.cpp index e5dc366cb631239e866dc28e2a79d1cd688cad82..0301978eb8840b354b896aee884425ce7567a184 100644 --- a/alib2std/src/extensions/string.cpp +++ b/alib2std/src/extensions/string.cpp @@ -1,12 +1,12 @@ /* - * string.hpp + * string.cpp * * Created on: Apr 1, 2013 * Author: Jan Travnicek */ -#include "../compare" -#include "../string" +#include <compare> +#include <string> #include <sstream> namespace std { @@ -40,4 +40,4 @@ string cstringToString ( char * param ) { return res; } -} +} /* namespace std */ diff --git a/alib2std/src/extensions/string.hpp b/alib2std/src/extensions/string.hpp index bf2ba878287d14a6422d8cf062bddb3471f78b9d..72e07e958abd532d550e5f991529c4467479c779 100644 --- a/alib2std/src/extensions/string.hpp +++ b/alib2std/src/extensions/string.hpp @@ -5,8 +5,8 @@ * Author: Jan Travnicek */ -#ifndef STRING_HPP_ -#define STRING_HPP_ +#ifndef __STRING_HPP_ +#define __STRING_HPP_ namespace std { @@ -28,4 +28,4 @@ string cstringToString ( char * param ); } /* namespace std */ -#endif /* STRING_HPP_ */ +#endif /* __STRING_HPP_ */ diff --git a/alib2std/src/extensions/tuple.hpp b/alib2std/src/extensions/tuple.hpp index d7a71445dd3faad7f78f8dc85f945c9d500ed81a..f4290cbfcdb73495ffc293dfb67cb77fc76d2161 100644 --- a/alib2std/src/extensions/tuple.hpp +++ b/alib2std/src/extensions/tuple.hpp @@ -1,5 +1,5 @@ /* - * tuple.cpp + * tuple.hpp * * Created on: Apr 1, 2013 * Author: Jan Travnicek diff --git a/alib2std/src/extensions/type_traits.hpp b/alib2std/src/extensions/type_traits.hpp index cce6b7b9b561e9953b7ad42224a9bb695a4b2085..c70b412e200c9899021206c32d596a87dcdf69bb 100644 --- a/alib2std/src/extensions/type_traits.hpp +++ b/alib2std/src/extensions/type_traits.hpp @@ -1,14 +1,12 @@ /* - * tuple.hpp + * type_traits.hpp * * Created on: Feb 28, 2014 * Author: Jan Travnicek */ -#ifndef TYPE_TRAITS_HPP_ -#define TYPE_TRAITS_HPP_ - -#include <type_traits> +#ifndef __TYPE_TRAITS_HPP_ +#define __TYPE_TRAITS_HPP_ namespace std { @@ -70,4 +68,4 @@ namespace std { } /* namespace std */ -#endif // TYPE_TRAITS_HPP_ +#endif /* __TYPE_TRAITS_HPP_ */ diff --git a/alib2std/src/extensions/typeindex.h b/alib2std/src/extensions/typeindex.h index dda5391b51eaec13515e373acd16ca3bcd9ec0d2..7f5c0bcb67d22cf6ed87a719884f8baa505dc502 100644 --- a/alib2std/src/extensions/typeindex.h +++ b/alib2std/src/extensions/typeindex.h @@ -1,15 +1,15 @@ /* - * typeindex.hpp + * typeindex.h * * Created on: Apr 1, 2013 * Author: Jan Travnicek */ -#ifndef TYPEINDEX_H_ -#define TYPEINDEX_H_ +#ifndef __TYPEINDEX_H_ +#define __TYPEINDEX_H_ inline int operator -( const std::type_index & first, const std::type_index & second ) { return ( first < second ) ? -1 : ( first > second ) ? 1 : 0; } -#endif // ifndef TYPEINDEX_H_ +#endif /* __TYPEINDEX_H_ */ diff --git a/alib2std/src/extensions/typeinfo.cpp b/alib2std/src/extensions/typeinfo.cpp index d14ebcc03de72ef4b1a97ddf7caf0a73481fe528..8767b632b1b1b2ded2d1eae82640cb2072b31a0c 100644 --- a/alib2std/src/extensions/typeinfo.cpp +++ b/alib2std/src/extensions/typeinfo.cpp @@ -1,11 +1,11 @@ /* - * istream.cpp + * typeinfo.cpp * * Created on: Apr 14, 2016 * Author: Jan Travnicek */ -#include "../typeinfo" +#include <typeinfo> namespace std { @@ -20,4 +20,4 @@ namespace std { return abi::__cxa_demangle(type.name(), 0, 0, &status); } -} +} /* namespace std */ diff --git a/alib2std/src/extensions/typeinfo.hpp b/alib2std/src/extensions/typeinfo.hpp index 25371b7bb9b5d1ee04bd138aca5a55e9bfb40035..447e0d69887e48bbd869c2f851018dfc2216e397 100644 --- a/alib2std/src/extensions/typeinfo.hpp +++ b/alib2std/src/extensions/typeinfo.hpp @@ -1,12 +1,12 @@ /* - * typeindex.hpp + * typeinfo.hpp * * Created on: Apr 1, 2013 * Author: Jan Travnicek */ -#ifndef TYPEINFO_H_ -#define TYPEINFO_H_ +#ifndef __TYPEINFO_HPP_ +#define __TYPEINFO_HPP_ namespace std { @@ -35,4 +35,4 @@ namespace std { } -#endif // ifndef TYPEINFO_H_ +#endif /* __TYPEINFO_HPP_ */ diff --git a/alib2std/src/extensions/variant.hpp b/alib2std/src/extensions/variant.hpp index 052d79b506b398752795b99f7a60295ff664f76f..5e3e4fb663ad030495f9ef1176ee7ce31767f041 100644 --- a/alib2std/src/extensions/variant.hpp +++ b/alib2std/src/extensions/variant.hpp @@ -1,4 +1,6 @@ /** + * variant.hpp + * * https://gist.github.com/tibordp/6909880 * * Created on: Feb 28, 2014 @@ -6,15 +8,8 @@ * Modified: Jan Travnicek */ -#ifndef VATIANT_HPP_ -#define VATIANT_HPP_ - -#include <iostream> -#include <utility> -#include <typeinfo> -#include "type_traits.hpp" -#include <string> -#include "compare.hpp" +#ifndef __VATIANT_HPP_ +#define __VATIANT_HPP_ namespace std { @@ -263,4 +258,4 @@ struct compare<variant<Ts...>> { } /* namespace std */ -#endif +#endif /* __VARIANT_HPP_ */ diff --git a/alib2std/src/fdstream b/alib2std/src/fdstream index b5798a55292a996f63e1072beebafb3ab4f2918c..987552b73cea0984be90999a89d53dc401e77f31 100644 --- a/alib2std/src/fdstream +++ b/alib2std/src/fdstream @@ -1,6 +1,11 @@ #ifndef __FDSTREAM_HEADER_WRAPPER_ #define __FDSTREAM_HEADER_WRAPPER_ +#include <unistd.h> +#include <fcntl.h> +#include <ostream> +#include <istream> +#include <array> #include "extensions/fdstream.hpp" #endif /* __FDSTREAM_HEADER_WRAPPER_ */ diff --git a/alib2std/src/iostream b/alib2std/src/iostream index 9eea11514aa4e94e2982d4422fe6de5ad91e1eee..c3ec70a438e3d150c57d35754517387e3f622d7d 100644 --- a/alib2std/src/iostream +++ b/alib2std/src/iostream @@ -2,6 +2,7 @@ #define __IOSTREAM_HEADER_WRAPPER_ #include <bits/../iostream> +#include "fdstream" #include "extensions/iostream.hpp" #endif /* __IOSTREAM_HEADER_WRAPPER_ */ diff --git a/alib2std/src/map b/alib2std/src/map index 24511250b0d3ade6f64107a3fd5195fbc964234c..defcdbecc77811ad6972b2b60c2a1b3860381ae2 100644 --- a/alib2std/src/map +++ b/alib2std/src/map @@ -4,6 +4,7 @@ #include <bits/../map> #include <ostream> #include "compare" +#include "pair" #include "extensions/map.hpp" #endif /* __MAP_HEADER_WRAPPER_ */