rcolyer.net
RC Lib  Version 202403231100
RC.h
Go to the documentation of this file.
1 /////////////////////////////////////////////////////////////////////
2 //
3 // RC Library, (c) 2011-2014, Ryan A. Colyer
4 // Distributed under the Boost Software License, v1.0. (LICENSE.txt)
5 //
6 /// \file RC.h
7 /// The main RC Library include file, which includes all other components.
8 /////////////////////////////////////////////////////////////////////
9 
10 #include "RCconfig.h"
11 
12 #ifndef RC_LIBRARY_H
13 #define RC_LIBRARY_H
14 
15 #ifdef WIN32
16 #ifndef _WIN32_WINNT
17 /// @cond UNDOC
18 #define _WIN32_WINNT 0x0501 // XP and later only, for network routines.
19 /// @endcond
20 #endif
21 #include <winsock2.h> // Supress warnings about include order.
22 #endif
23 
24 #include "Macros.h"
25 #include "Types.h"
26 #include "Errors.h"
27 #include "RCBits.h"
28 #include "Iter.h"
29 #include "Data1D.h"
30 #include "Data2D.h"
31 #include "Data3D.h"
32 #include "Bitfield.h"
33 #include "Bitfield2D.h"
34 #include "Bitfield3D.h"
35 #include "Ptr.h"
36 #include "APtr.h"
37 #include "RevPtr.h"
38 #include "Tuple.h"
39 #include "Caller.h"
40 #include "RStr.h"
41 #include "RTime.h"
42 #include "File.h"
43 #include "RND.h"
44 #include "Net.h"
45 
46 
47 /// \def RC_USE
48 /// Place this shorthand macro after including RC.h to use namespaces RC
49 /// and std.
50 #define RC_USE using namespace RC; \
51  using namespace std; \
52  namespace std {namespace placeholders{}} \
53  using namespace std::placeholders;
54 /// \def RC_MAIN
55 /// This macro wraps int main so that command line arguments are placed into
56 /// RC::Data1D<RC::RStr> args.
57 /** Usually args[0] is the executable name, and 1 through args.size()-1 will
58  * be the command line parameters. Usage example: RC_MAIN {
59  * if (args.size()<2) {Help(); return -1;} Code(args[1]); Here(); return 0; }
60  */
61 #define RC_MAIN int RC_main(RC::Data1D<RC::RStr> &args); \
62  int main (int argc, char *argv[]) { \
63  RC::Segfault::SetHandler();\
64  RC::Data1D<RC::RStr> args = RC::RStr::Args(argc, argv); \
65  return RC_main(args); \
66  } \
67  int RC_main(RC::Data1D<RC::RStr> &RC_UNUSED_PARAM(args))
68 
69 #endif // RC_LIBRARY_H
70 
A reference counting ptr that is auto-deleted as the last copy leaves scope.
Provides a two-dimensional structure of packed bits.
Provides a three-dimensional structure of packed bits.
Provides a one-dimensional vector-like structure of packed bits.
Provides a set of generalized functors for calling functions and methods.
Provides a one-dimensional vector-like structure.
Provides a bounds-safe two-dimensional resizeable structure.
Provides a bounds-safe three-dimensional resizeable structure.
Provides informative exception handling.
Provides file input and output, and file / directory tools.
Provides a bounds-checked iterator that knows when its target was deleted.
Provides a set of convenience macros for metaprogramming and debugging.
Provides basic cross-platform socket networking, with support for both blocking and non-blocking send...
Provides a safe pointer class which throws exceptions.
Provides short convenience classes and functions.
The version information and configuration settings for RC Lib.
Provides random number generator classes.
Provides a robust value-added wrapper for std::string.
Provides classes for accessing and working with dates and times.
A reference counting pointer that revokes (NULLs) all copies when one set to AutoRevoke(true) leaves ...
Provides a Tuple class which can apply its contents as function parameters.
Provides typedefs and routines for working with primitives.
email address
— (c) 2015