Ponca  eb7239a9c07e156fb1edc6faac7fe89e2b256bda
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::internal::FactoryBase< _FactoryEntries > Struct Template Reference

Base class for factory. More...

#include <factory.h>

Inheritance diagram for Ponca::internal::FactoryBase< _FactoryEntries >:
Collaboration diagram for Ponca::internal::FactoryBase< _FactoryEntries >:

Public Types

using FactoryEntries = _FactoryEntries
using FullComputeObjectList = ComputeObjectList<FactoryEntries>

Static Public Member Functions

template<template< typename > class... Preds>
static decltype(auto) Filter ()
 Returns a new object that is a filtered version of the current one.
template<StringLiteral... Names>
static decltype(auto) Filter ()
 Returns a new object that is a filtered version of the current one.
template<StringLiteral Name>
static decltype(auto) GetMethod ()
 Return an object by it's id.
template<typename Func>
static void foreach (Func &&fun)
static constexpr size_t size ()
 Return the number of object held within the Factory.
static constexpr decltype(auto) GetNames ()
 Return the names of the currently held objects.

Detailed Description

template<typename _FactoryEntries>
struct Ponca::internal::FactoryBase< _FactoryEntries >

Base class for factory.

This class behaves similarly to ComputeObjectList but do not store any information. It is here to have plain static methods.

Template Parameters
_FactoryEntriesA std::tuple<FactoryEntry>

Definition at line 168 of file factory.h.

Member Typedef Documentation

◆ FactoryEntries

template<typename _FactoryEntries>
using Ponca::internal::FactoryBase< _FactoryEntries >::FactoryEntries = _FactoryEntries

Definition at line 170 of file factory.h.

◆ FullComputeObjectList

template<typename _FactoryEntries>
using Ponca::internal::FactoryBase< _FactoryEntries >::FullComputeObjectList = ComputeObjectList<FactoryEntries>

Definition at line 171 of file factory.h.

Member Function Documentation

◆ Filter() [1/2]

template<typename _FactoryEntries>
template<StringLiteral... Names>
decltype(auto) Ponca::internal::FactoryBase< _FactoryEntries >::Filter ( )
inlinestatic

Returns a new object that is a filtered version of the current one.

Template Parameters
PredsList of predicate to filter by

Definition at line 186 of file factory.h.

◆ Filter() [2/2]

template<typename _FactoryEntries>
template<template< typename > class... Preds>
decltype(auto) Ponca::internal::FactoryBase< _FactoryEntries >::Filter ( )
inlinestatic

Returns a new object that is a filtered version of the current one.

Template Parameters
PredsList of predicate to filter by

Definition at line 177 of file factory.h.

◆ foreach()

template<typename _FactoryEntries>
template<typename Func>
void Ponca::internal::FactoryBase< _FactoryEntries >::foreach ( Func && fun)
inlinestatic

Definition at line 204 of file factory.h.

◆ GetMethod()

template<typename _FactoryEntries>
template<StringLiteral Name>
decltype(auto) Ponca::internal::FactoryBase< _FactoryEntries >::GetMethod ( )
inlinestatic

Return an object by it's id.

In order for this method to work, it is expected that only one method has the specified id !

This method returns the ComputeObject, not a ComputeObjectList !

Template Parameters
idThe id of the method

Definition at line 195 of file factory.h.

◆ GetNames()

template<typename _FactoryEntries>
constexpr decltype(auto) Ponca::internal::FactoryBase< _FactoryEntries >::GetNames ( )
inlinestaticconstexpr

Return the names of the currently held objects.

Definition at line 217 of file factory.h.

◆ size()

template<typename _FactoryEntries>
constexpr size_t Ponca::internal::FactoryBase< _FactoryEntries >::size ( )
inlinestaticconstexpr

Return the number of object held within the Factory.

Definition at line 212 of file factory.h.