simulavr  1.1.0
avrfactory.h File Reference
#include <string>

Go to the source code of this file.

Classes

class  AvrFactory
 Produces AVR devices. More...
 

Macros

#define AVR_REGISTER(name, class)
 

Macro Definition Documentation

◆ AVR_REGISTER

#define AVR_REGISTER (   name,
  class 
)
Value:
struct AVRFactoryEntryMaker_ ## name { \
public: \
static AvrDevice *create_one() { \
return new class; \
} \
AVRFactoryEntryMaker_ ## name() { \
AvrFactory::reg(#name, create_one); \
} \
}; \
AVRFactoryEntryMaker_ ## name maker_ ##name;
Basic AVR device, contains the core functionality.
Definition: avrdevice.h:66
static void reg(const std::string name, AvrDeviceCreator create)
Register a creation static method with the factory.
Definition: avrfactory.cpp:38

Macro to be used to register an AVR device with the AvrFactory. For a usage example, see atmega128.cpp.

Definition at line 69 of file avrfactory.h.