#pragma once // clang-format off #ifndef FORMULABYEXAMPLECARD_INTEROP_NATIVEINTEROP_H #define FORMULABYEXAMPLECARD_INTEROP_NATIVEINTEROP_H //------------------------------------------------------------------------------ // // This code was generated by the Reka compiler. // Changes to this file may cause incorrect behavior and will be lost if the code is regenerated. // //------------------------------------------------------------------------------ #include namespace FormulaByExampleCard { namespace Interop { struct IFormulaByExampleCardProps; //================================================================================ // Enums //================================================================================ enum class FormulaKind : int32_t { genericFormula = 0, rowNumbering = 1, }; //================================================================================ // Custom Values //================================================================================ struct IFormulaByExampleCardProps { std::string formula {}; std::string range {}; ::FormulaByExampleCard::Interop::FormulaKind kind {}; }; //================================================================================ // Services //================================================================================ struct DECLSPEC_NOVTABLE IFormulaByExampleCardInterop : IUnknown { constexpr static const char* Name = "FormulaByExampleCard::Interop::IFormulaByExampleCardInterop"; virtual void applySuggestion() noexcept = 0; virtual void declineSuggestion() noexcept = 0; virtual void giveFeedback() noexcept = 0; virtual void applyAsValue() noexcept = 0; }; }} // namespace FormulaByExampleCard::Interop namespace Mso::JSHost { //================================================================================ // Custom Value serialization //================================================================================ LIBLET_PUBLICAPI void ReadJsonObject(Mso::JSHost::JsonReader& reader, ::FormulaByExampleCard::Interop::IFormulaByExampleCardProps& obj) noexcept; LIBLET_PUBLICAPI void WriteJsonObject(Mso::JSHost::JsonWriter& writer, const ::FormulaByExampleCard::Interop::IFormulaByExampleCardProps& obj) noexcept; //================================================================================ // Service implementation //================================================================================ template <> struct DataService<::FormulaByExampleCard::Interop::IFormulaByExampleCardInterop> : RekaObject<::FormulaByExampleCard::Interop::IFormulaByExampleCardInterop> { using DataServiceBase = DataService; DataService(IRekaContext& serviceContext) noexcept : RekaObjectBase(serviceContext) { } void Invoke(const char* methodName, const char* serializedValue, Mso::TCntPtr&& result) noexcept override; }; } // namespace Mso::JSHost #endif