WARPXM v1.10.0
Loading...
Searching...
No Matches
wxcreator.h File Reference
#include "wxexcept.h"
#include "wmopaqueptr.h"
#include <iostream>
#include <unordered_map>
#include <stdexcept>
#include <string>
#include <vector>
#include <typeinfo>
#include <memory>

Go to the source code of this file.

Classes

class  wxm::detail::creator_base
 implementation detail so deletion happens correctly More...
 
class  WxCreatorMapBase< B >
 Defines Common Interface for WxCreatorMap. More...
 
class  WxCreatorMap< B >
 
class  WxCreatorBase< B >
 
class  WxCreator< D, B >
 This creator is meant to be used for classes with default constructor. More...
 
class  WxCreatorForChildrenBase< B >
 
class  WxCreatorForChildren< D, B >
 This creator is meant to be used for classes that require a parent argument to their constructor. More...
 

Namespaces

namespace  wxm
 Base namespace for everything not included in the global namespace.
 
namespace  wxm::detail
 

Macros

#define WXM_UNUSED
 
#define WXM_PRIVATE_UNIQUE_ID   __LINE__
 
#define WXM_PRIVATE_NAME(n)   WXM_PRIVATE_CONCAT(wxm_creator_, WXM_PRIVATE_UNIQUE_ID, n)
 
#define WXM_PRIVATE_CONCAT(a, b, c)   WXM_PRIVATE_CONCAT2(a, b, c)
 
#define WXM_PRIVATE_CONCAT2(a, b, c)   a##b##c##_
 
#define REGISTER_CREATOR(name, specialization, base)
 
#define REGISTER_CREATOR_FOR_CHILDREN(name, specialization, base)
 

Functions

std::unordered_map< std::string, std::unique_ptr< creator_base > > & wxm::detail::creatorsForDefault ()
 
std::unordered_map< std::string, std::unique_ptr< creator_base > > & wxm::detail::creatorsForChildren ()
 

Macro Definition Documentation

◆ REGISTER_CREATOR

#define REGISTER_CREATOR (   name,
  specialization,
  base 
)
Value:
namespace \
{ \
static auto& WXM_PRIVATE_NAME(registered) WXM_UNUSED = \
}
This creator is meant to be used for classes with default constructor.
Definition: wxcreator.h:247
static wxm::detail::creator_base & addCreator(const std::string &nm, wxm::detail::creator_base *b)
Add a new creator object into the list of available creators for base classes that have default const...
Definition: wxcreator.h:93
#define WXM_UNUSED
Definition: wxcreator.h:300
#define WXM_PRIVATE_NAME(n)
Definition: wxcreator.h:313

◆ REGISTER_CREATOR_FOR_CHILDREN

#define REGISTER_CREATOR_FOR_CHILDREN (   name,
  specialization,
  base 
)
Value:
namespace \
{ \
static auto& WXM_PRIVATE_NAME(registered) \
name, \
}
This creator is meant to be used for classes that require a parent argument to their constructor.
Definition: wxcreator.h:279
static wxm::detail::creator_base & addCreatorForChildren(const std::string &nm, wxm::detail::creator_base *b)
Add a new creator object into the list of available creators for base classes that have a parent poin...
Definition: wxcreator.h:114

◆ WXM_PRIVATE_CONCAT

#define WXM_PRIVATE_CONCAT (   a,
  b,
 
)    WXM_PRIVATE_CONCAT2(a, b, c)

◆ WXM_PRIVATE_CONCAT2

#define WXM_PRIVATE_CONCAT2 (   a,
  b,
 
)    a##b##c##_

◆ WXM_PRIVATE_NAME

#define WXM_PRIVATE_NAME (   n)    WXM_PRIVATE_CONCAT(wxm_creator_, WXM_PRIVATE_UNIQUE_ID, n)

◆ WXM_PRIVATE_UNIQUE_ID

#define WXM_PRIVATE_UNIQUE_ID   __LINE__

◆ WXM_UNUSED

#define WXM_UNUSED