SST/macro
Classes | Namespaces | Macros | Enumerations | Functions
util.h File Reference
#include <sprockit/spkt_config.h>
#include <sprockit/errors.h>
#include <sprockit/preprocessor.h>
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sprockit::modal_mixin::ModalMixinBase
 

Namespaces

 sprockit
 
 sprockit::modal_mixin
 

Macros

#define safe_cast(type, ...)   ::sprockit::__safe_cast__<type>(#type, __FILE__, __LINE__, __VA_ARGS__)
 First entry in VA_ARGS is the obj Second entry is optional being an error msg. More...
 
#define test_cast(type, obj)   dynamic_cast<type*>(obj)
 
#define known_cast(type, ...)   safe_cast(type, __VA_ARGS__)
 
#define interface_cast(type, obj)   dynamic_cast<type*>(obj)
 
#define ASSERT_CORRECT_MODE   check_mode(__PRETTY_FUNCTION__);
 
#define SPKT_DELEGATE_ALL_OVERLOADS(method_name, member)   spkt_static_assert(false, "SPKT_DELEGATE_ALL_OVERLOADS requires c++11")
 
#define spkt_find_if(...)   spkt_static_assert(false, "spkt_find_if() requires c++11")
 

Enumerations

enum  sprockit::modal_mixin::disabled_t { sprockit::modal_mixin::disabled }
 

Functions

template<class Out , class In >
Out * sprockit::__safe_cast__ (const char *objname, const char *file, int line, In *in, const char *error_msg="error")
 
template<class maptype , class keytype >
const maptype::mapped_type & sprockit::mapget (const maptype &mapobj, const keytype &keyobj, const char *errormsg)
 

Macro Definition Documentation

#define ASSERT_CORRECT_MODE   check_mode(__PRETTY_FUNCTION__);

Definition at line 185 of file util.h.

#define interface_cast (   type,
  obj 
)    dynamic_cast<type*>(obj)

Definition at line 55 of file util.h.

#define known_cast (   type,
  ... 
)    safe_cast(type, __VA_ARGS__)

Definition at line 52 of file util.h.

#define safe_cast (   type,
  ... 
)    ::sprockit::__safe_cast__<type>(#type, __FILE__, __LINE__, __VA_ARGS__)

First entry in VA_ARGS is the obj Second entry is optional being an error msg.

Definition at line 46 of file util.h.

Referenced by sstmac::hw::multipath_router< ParentRouter >::set_topology().

#define SPKT_DELEGATE_ALL_OVERLOADS (   method_name,
  member 
)    spkt_static_assert(false, "SPKT_DELEGATE_ALL_OVERLOADS requires c++11")

Definition at line 224 of file util.h.

#define spkt_find_if (   ...)    spkt_static_assert(false, "spkt_find_if() requires c++11")

Definition at line 238 of file util.h.

#define test_cast (   type,
  obj 
)    dynamic_cast<type*>(obj)

Definition at line 49 of file util.h.