PDF SDK Documentation

Comprehensive Guide for Developers: Features, Integration, and API Reference

Loading...
Searching...
No Matches
function.h
1// Copyright (c) 2009-2025 Avanquest Software. All rights reserved.
2
3#ifndef PDFSDK_CXX_PDF_FUNCTION_H_INCLUDED_
4#define PDFSDK_CXX_PDF_FUNCTION_H_INCLUDED_
5
6#include <span>
7#include <vector>
8
9#include "wrapper_base.h"
10
11namespace PDF {
12
18class Function : public detail::RefCountedHandle<PDEFunction> {
19public:
25 static Function CreateFromPdfObject(const Object& object);
26
32
37 size_t GetNumInputs() const;
38
43 size_t GetNumOutputs() const;
44
45#ifndef SWIG
55 void Execute(std::span<const float> inputs, std::span<float> outputs);
56#endif // SWIG
57
63 std::vector<float> Execute(std::span<const float> inputs);
64
65 PDF_CXX_CORE_WRAPPER_DEFINE_MEMBERS_(Function, PDEFunction)
66};
67
68} // namespace PDF
69
70#include "function_impl.inl"
71
72#endif // PDFSDK_CXX_PDF_FUNCTION_H_INCLUDED_
size_t GetNumInputs() const
Get the number of input values.
Object GetPdfObject() const
Get the PDF object associated with this function.
size_t GetNumOutputs() const
Get the number of output values.
void Execute(std::span< const float > inputs, std::span< float > outputs)
Evaluates the function, writing the result into a caller-provided buffer.
std::vector< float > Execute(std::span< const float > inputs)
Evaluates the function for the specified input values.
static Function CreateFromPdfObject(const Object &object)
Creates a function from the specified PDF object.
Represents a PDF object.
Definition object.h:25