47template<
typename Product>
69 if(
factory ==
nullptr)
return -1;
70 auto &
list = factoryList();
73 promekiInfo(
"Registered FileFormatFactory %s",
87 auto &
list = factoryList();
89 if(
f->canDoOperation(
ctx))
return f;
118 size_t dot = filename.
rfind(
'.');
179#define PROMEKI_REGISTER_FILE_FORMAT_FACTORY(product, name) \
180 [[maybe_unused]] static int \
181 PROMEKI_CONCAT(__promeki_fff_, PROMEKI_UNIQUE_ID) = \
182 FileFormatFactory<product>::registerFactory(new name);
@ NotImplemented
Feature is not implemented.
Definition error.h:55
Abstract base class for all I/O devices.
Definition iodevice.h:29
Dynamic array container wrapping std::vector.
Definition list.h:40
size_t size() const noexcept
Returns the number of elements in the list.
Definition list.h:301
Manages a list of strings.
Definition stringlist.h:21
Encoding-aware string class with copy-on-write semantics.
Definition string.h:35
String toLower() const
Returns a lowercase copy of this string.
Definition string.h:624
size_t size() const
Returns the number of characters in the string.
Definition string.h:292
static constexpr size_t npos
Sentinel value indicating "not found".
Definition string.h:91
String mid(size_t pos, size_t count=npos) const
Returns a substring starting at pos (alias for substr).
Definition string.h:425
size_t rfind(char val, size_t from=npos) const
Finds the last occurrence of a character.
Definition string.h:375
#define PROMEKI_NAMESPACE_BEGIN
Starts a promeki namespace block.
Definition namespace.h:14
#define PROMEKI_NAMESPACE_END
Ends a promeki namespace block.
Definition namespace.h:19
Context passed to factory methods for lookup and creation.
Definition fileformatfactory.h:56
String formatHint
Extension hint (e.g. "wav"), no dot.
Definition fileformatfactory.h:59
int operation
Product-specific operation (e.g. Reader/Writer).
Definition fileformatfactory.h:57
String filename
Full path, if available.
Definition fileformatfactory.h:58
IODevice * device
IODevice to operate on, if available.
Definition fileformatfactory.h:60