OXY API 1.0
OXY API Library Documentation
Loading...
Searching...
No Matches
oxy::make_object_fn Struct Reference

Function object to generate an object containing the given contents and type. More...

#include <object.hpp>

Public Member Functions

object_t operator() (contents_t const &item, eType const &type) const
object_t operator() (std::string const &item, eType const &type) const

Detailed Description

Function object to generate an object containing the given contents and type.

This function object provides two operator() overloads: one that takes a string and a type, and another that takes contents and a type. Both overloads compute the hash of the input and create an object_t instance with the computed hash and specified type. It is designed to be used in a constexpr context for compile-time evaluation of object creation.

Member Function Documentation

◆ operator()() [1/2]

object_t oxy::make_object_fn::operator() ( contents_t const & item,
eType const & type ) const
inline
Parameters
item- The input contents to be hashed.
type- The type of the object to be created.
Returns
An object_t instance containing the computed hash and specified type.

References oxy::hash.

◆ operator()() [2/2]

object_t oxy::make_object_fn::operator() ( std::string const & item,
eType const & type ) const
inline
Parameters
item- The input string to be hashed.
type- The type of the object to be created.
Returns
An object_t instance containing the computed hash and specified type.

References oxy::hash.