rcolyer.net
RC Lib  Version 202403231100
Macros
RC.h File Reference

The main RC Library include file, which includes all other components. More...

#include "RCconfig.h"
#include <winsock2.h>
#include "Macros.h"
#include "Types.h"
#include "Errors.h"
#include "RCBits.h"
#include "Iter.h"
#include "Data1D.h"
#include "Data2D.h"
#include "Data3D.h"
#include "Bitfield.h"
#include "Bitfield2D.h"
#include "Bitfield3D.h"
#include "Ptr.h"
#include "APtr.h"
#include "RevPtr.h"
#include "Tuple.h"
#include "Caller.h"
#include "RStr.h"
#include "RTime.h"
#include "File.h"
#include "RND.h"
#include "Net.h"

Go to the source code of this file.

Macros

#define RC_USE
 Place this shorthand macro after including RC.h to use namespaces RC and std. More...
 
#define RC_MAIN
 This macro wraps int main so that command line arguments are placed into RC::Data1D<RC::RStr> args. More...
 

Detailed Description

The main RC Library include file, which includes all other components.

Macro Definition Documentation

◆ RC_MAIN

#define RC_MAIN
Value:
int RC_main(RC::Data1D<RC::RStr> &args); \
int main (int argc, char *argv[]) { \
RC::Data1D<RC::RStr> args = RC::RStr::Args(argc, argv); \
return RC_main(args); \
} \
#define RC_UNUSED_PARAM(v)
Use in function headers as void func(int RC_UNUSED_PARAM(x)) to suppress warnings about non-use.
Definition: Macros.h:175
A bounds-safe one-dimensional vector-like structure.
Definition: Data1D.h:49
static Data1D< RStr > Args(int argc=0, char *argv[]=NULL)
Converts standard arguments to "int main" into a Data1D<RStr>.
Definition: RStr.h:2143
static void SetHandler()
Call this to set the segfault handler to Segfault::Handler.
Definition: Errors.h:310

This macro wraps int main so that command line arguments are placed into RC::Data1D<RC::RStr> args.

Usually args[0] is the executable name, and 1 through args.size()-1 will be the command line parameters. Usage example: RC_MAIN { if (args.size()<2) {Help(); return -1;} Code(args[1]); Here(); return 0; }

◆ RC_USE

#define RC_USE
Value:
using namespace RC; \
using namespace std; \
namespace std {namespace placeholders{}} \
using namespace std::placeholders;
Definition: APtr.h:25

Place this shorthand macro after including RC.h to use namespaces RC and std.

email address
— (c) 2015