RSC  0.10.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
langutils.h File Reference
#include <string>
#include <boost/cstdint.hpp>
#include <boost/shared_ptr.hpp>
#include "rsc/rscexports.h"
Include dependency graph for langutils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  rsc::misc::NullDeleter
 A deleter object that can be used with boost::shared_ptr that doesn't release any memory. More...
 
class  rsc::misc::ParentSharedPtrDeleter< ParentType >
 A deleter for boost::shared_ptr which enables to use a pointer in a shared_ptr, which is not a shared_ptr itself and owned by another object. More...
 

Namespaces

 rsc
 
 rsc::misc
 

Macros

#define DEPRECATED_MSG(func, msg)   func
 This macro allows you to mark a function as being deprecated including a message explaining the deprecation. More...
 
#define DEPRECATED(fun)   DEPRECATED_MSG(fun, "Use of deprecated construct.")
 This macro allows you to mark a function as being deprecated. More...
 
#define DEPRECATED_CLASS(msg)
 This macro allows you to mark a class as being deprecated. More...
 

Functions

boost::uint64_t rsc::misc::currentTimeMillis ()
 Returns the current system time as milliseconds. More...
 
boost::uint64_t rsc::misc::currentTimeMicros ()
 Returns the current system time as microseconds. More...
 
char rsc::misc::randAlnumChar ()
 Generates a random alpha-numeric character. More...
 
std::string rsc::misc::randAlnumStr (const std::string::size_type &length)
 Generates a random alpha-numeric string with fixed length. More...
 

Macro Definition Documentation

#define DEPRECATED (   fun)    DEPRECATED_MSG(fun, "Use of deprecated construct.")

This macro allows you to mark a function as being deprecated.

A default explanatory message will be used. Usually you should use DEPRECATED_MSG instead.

Usage:

DEPRECATED_MSG(void deprecatedFunction(int foo));
void deprecatedFunction(int foo) {
int bla = foo + 1;
bla = bla + 1;
}
Note
If your return type contains a comma (template) you need to typedef it. Otherwise the commas are interpreted as arguments to this macro.

Definition at line 168 of file langutils.h.

#define DEPRECATED_CLASS (   msg)

This macro allows you to mark a class as being deprecated.

Usage:

class DEPRECATED_CLASS("Your explanation") SimpleDeprecation;
class SimpleDeprecation {
};
Note
On GCC, a bug might prevent deprecation warnings for template classes

Definition at line 192 of file langutils.h.

#define DEPRECATED_MSG (   func,
  msg 
)    func

This macro allows you to mark a function as being deprecated including a message explaining the deprecation.

Usage:

DEPRECATED_MSG(void deprecatedFunction(int foo), "use XYZ instead");
void deprecatedFunction(int foo) {
int bla = foo + 1;
bla = bla + 1;
}
Note
If your return type contains a comma (template) you need to typedef it. Otherwise the commas are interpreted as arguments to this macro.

Definition at line 148 of file langutils.h.