Ponca  fd5150bf9079aabdb82a6f05e419b76111c1f788
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 156 of file factory.h.

Member Typedef Documentation

◆ FactoryEntries

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

Definition at line 158 of file factory.h.

◆ FullComputeObjectList

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

Definition at line 159 of file factory.h.

Member Function Documentation

◆ Filter() [1/2]

template<typename _FactoryEntries >
template<template< typename > class... Preds>
static 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 165 of file factory.h.

◆ Filter() [2/2]

template<typename _FactoryEntries >
template<StringLiteral... Names>
static 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 174 of file factory.h.

◆ foreach()

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

Definition at line 192 of file factory.h.

◆ GetMethod()

template<typename _FactoryEntries >
template<StringLiteral Name>
static 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 183 of file factory.h.

◆ GetNames()

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

Return the names of the currently held objects.

Definition at line 205 of file factory.h.

◆ size()

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

Return the number of object held within the Factory.

Definition at line 200 of file factory.h.