# FairMQ: fair::mq::shmem::TransportFactory Class Reference

fair::mq::shmem::TransportFactory Class Referencefinal
Inheritance diagram for fair::mq::shmem::TransportFactory:
[legend]
Collaboration diagram for fair::mq::shmem::TransportFactory:
[legend]

## Public Member Functions

| TransportFactory (const std::string &deviceId="", const ProgOptions *config=nullptr)
| TransportFactory (const TransportFactory &)=delete
TransportFactory | operator= (const TransportFactory &)=delete
MessagePtr | CreateMessage () override
| Create empty FairMQMessage (for receiving) More...
MessagePtr | CreateMessage (Alignment alignment) override
| Create empty FairMQMessage (for receiving), align received buffer to specified alignment. More...
MessagePtr | CreateMessage (const size_t size) override
| Create new FairMQMessage of specified size. More...
MessagePtr | CreateMessage (const size_t size, Alignment alignment) override
| Create new FairMQMessage of specified size and alignment. More...
MessagePtr | CreateMessage (void *data, const size_t size, fairmq_free_fn *ffn, void *hint=nullptr) override
| Create new FairMQMessage with user provided buffer and size. More...
MessagePtr | CreateMessage (UnmanagedRegionPtr &region, void *data, const size_t size, void *hint=0) override
| create a message with the buffer located within the corresponding unmanaged region More...
SocketPtr | CreateSocket (const std::string &type, const std::string &name) override
| Create a socket.
PollerPtr | CreatePoller (const std::vector< FairMQChannel > &channels) const override
| Create a poller for a single channel (all subchannels)
PollerPtr | CreatePoller (const std::vector< FairMQChannel * > &channels) const override
| Create a poller for specific channels.
PollerPtr | CreatePoller (const std::unordered_map< std::string, std::vector< FairMQChannel >> &channelsMap, const std::vector< std::string > &channelList) const override
| Create a poller for specific channels (all subchannels)
UnmanagedRegionPtr | CreateUnmanagedRegion (const size_t size, RegionCallback callback=nullptr, const std::string &path="", int flags=0) override
| Create new UnmanagedRegion. More...
UnmanagedRegionPtr | CreateUnmanagedRegion (const size_t size, RegionBulkCallback bulkCallback=nullptr, const std::string &path="", int flags=0) override
UnmanagedRegionPtr | CreateUnmanagedRegion (const size_t size, int64_t userFlags, RegionCallback callback=nullptr, const std::string &path="", int flags=0) override
| Create new UnmanagedRegion. More...
UnmanagedRegionPtr | CreateUnmanagedRegion (const size_t size, int64_t userFlags, RegionBulkCallback bulkCallback=nullptr, const std::string &path="", int flags=0) override
UnmanagedRegionPtr | CreateUnmanagedRegion (const size_t size, int64_t userFlags, RegionCallback callback, RegionBulkCallback bulkCallback, const std::string &path, int flags)
void | SubscribeToRegionEvents (RegionEventCallback callback) override
| Subscribe to region events (creation, destruction, ...) More...
bool | SubscribedToRegionEvents () override
| Check if there is an active subscription to region events. More...
void | UnsubscribeFromRegionEvents () override
| Unsubscribe from region events.
std::vector< fair::mq::RegionInfo > | GetRegionInfo () override
Transport | GetType () const override
| Get transport type.
void | Interrupt () override
void | Resume () override
void | Reset () override
Public Member Functions inherited from FairMQTransportFactory
| FairMQTransportFactory (const std::string &id)
auto | GetId () const -> const std::string
fair::mq::ChannelResource * | GetMemoryResource ()
| Get a pointer to the associated polymorphic memory resource.
| operator fair::mq::ChannelResource * ()
template<typename T >
FairMQMessagePtr | NewSimpleMessage (const T &data)
template<std::size_t N>
FairMQMessagePtr | NewSimpleMessage (const char(&data)[N])
FairMQMessagePtr | NewSimpleMessage (const std::string &str)
template<typename T >
FairMQMessagePtr | NewStaticMessage (const T &data)
FairMQMessagePtr | NewStaticMessage (const std::string &str)

## Additional Inherited Members

Static Public Member Functions inherited from FairMQTransportFactory
static auto | CreateTransportFactory (const std::string &type, const std::string &id="", const fair::mq::ProgOptions *config=nullptr) -> std::shared_ptr< FairMQTransportFactory >
static void | FairMQNoCleanup (void *, void *)
template<typename T >
static void | FairMQSimpleMsgCleanup (void *, void *obj)

## Member Function Documentation

## CreateMessage() [1/6]

MessagePtr fair::mq::shmem::TransportFactory::CreateMessage | ( |  | ) |

inlineoverridevirtual

Create empty FairMQMessage (for receiving)

Returns
  pointer to FairMQMessage

Implements FairMQTransportFactory.

## CreateMessage() [2/6]

MessagePtr fair::mq::shmem::TransportFactory::CreateMessage | ( | Alignment | alignment | ) |

inlineoverridevirtual

Create empty FairMQMessage (for receiving), align received buffer to specified alignment.

Parameters

  alignment | alignment to align received buffer to

Returns
  pointer to FairMQMessage

Implements FairMQTransportFactory.

## CreateMessage() [3/6]

MessagePtr fair::mq::shmem::TransportFactory::CreateMessage | ( | const size_t | size | ) |

inlineoverridevirtual

Create new FairMQMessage of specified size.

Parameters

  size | message size

Returns
  pointer to FairMQMessage

Implements FairMQTransportFactory.

## CreateMessage() [4/6]

MessagePtr fair::mq::shmem::TransportFactory::CreateMessage | ( | const size_t | size,
|  | Alignment | alignment
| ) |  |

inlineoverridevirtual

Create new FairMQMessage of specified size and alignment.

Parameters

  size | message size
  alignment | message alignment

Returns
  pointer to FairMQMessage

Implements FairMQTransportFactory.

## CreateMessage() [5/6]

MessagePtr fair::mq::shmem::TransportFactory::CreateMessage | ( | UnmanagedRegionPtr & | unmanagedRegion,
|  | void * | data,
|  | const size_t | size,
|  | void * | hint = `0`
| ) |  |

inlineoverridevirtual

create a message with the buffer located within the corresponding unmanaged region

Parameters

  unmanagedRegion | the unmanaged region that this message buffer belongs to
  data | message buffer (must be within the region - checked at runtime by the transport)
  size | size of the message
  hint | optional parameter, returned to the user in the FairMQRegionCallback

Implements FairMQTransportFactory.

## CreateMessage() [6/6]

MessagePtr fair::mq::shmem::TransportFactory::CreateMessage | ( | void * | data,
|  | const size_t | size,
|  | fairmq_free_fn * | ffn,
|  | void * | hint = `nullptr`
| ) |  |

inlineoverridevirtual

Create new FairMQMessage with user provided buffer and size.

Parameters

  data | pointer to user provided buffer
  size | size of the user provided buffer
  ffn | callback, called when the message is transfered (and can be deleted)
  obj | optional helper pointer that can be used in the callback

Returns
  pointer to FairMQMessage

Implements FairMQTransportFactory.

## CreateUnmanagedRegion() [1/2]

UnmanagedRegionPtr fair::mq::shmem::TransportFactory::CreateUnmanagedRegion | ( | const size_t | size,
|  | int64_t | userFlags,
|  | RegionCallback | callback = `nullptr`,
|  | const std::string & | path = `""`,
|  | int | flags = `0`
| ) |  |

inlineoverridevirtual

Create new UnmanagedRegion.

Parameters

  size | size of the region
  userFlags | flags to be stored with the region, have no effect on the transport, but can be retrieved from the region by the user
  callback | callback to be called when a message belonging to this region is no longer needed by the transport
  path | optional parameter to pass to the underlying transport
  flags | optional parameter to pass to the underlying transport

Returns
  pointer to UnmanagedRegion

Implements FairMQTransportFactory.

## CreateUnmanagedRegion() [2/2]

UnmanagedRegionPtr fair::mq::shmem::TransportFactory::CreateUnmanagedRegion | ( | const size_t | size,
|  | RegionCallback | callback = `nullptr`,
|  | const std::string & | path = `""`,
|  | int | flags = `0`
| ) |  |

inlineoverridevirtual

Create new UnmanagedRegion.

Parameters

  size | size of the region
  callback | callback to be called when a message belonging to this region is no longer needed by the transport
  path | optional parameter to pass to the underlying transport
  flags | optional parameter to pass to the underlying transport

Returns
  pointer to UnmanagedRegion

Implements FairMQTransportFactory.

## SubscribedToRegionEvents()

bool fair::mq::shmem::TransportFactory::SubscribedToRegionEvents | ( |  | ) |

inlineoverridevirtual

Check if there is an active subscription to region events.

Returns
  true/false

Implements FairMQTransportFactory.

## SubscribeToRegionEvents()

void fair::mq::shmem::TransportFactory::SubscribeToRegionEvents | ( | RegionEventCallback | callback | ) |

inlineoverridevirtual

Subscribe to region events (creation, destruction, ...)

Parameters

  callback | the callback that is called when a region event occurs

Implements FairMQTransportFactory.

The documentation for this class was generated from the following file:

- fairmq/shmem/TransportFactory.h

privacy