Program Listing for File ifunctioncall.h

Return to documentation for file (include\serialization\ifunctioncall.h)

/******************************************************************************
© Intel Corporation.

This software and the related documents are Intel copyrighted materials,
and your use of them is governed by the express license under which they
were provided to you ("License"). Unless the License provides otherwise,
you may not use, modify, copy, publish, distribute, disclose or transmit
this software or the related documents without Intel's prior written
permission.


 This software and the related documents are provided as is, with no express
or implied warranties, other than those that are expressly stated in the
License.

******************************************************************************/

#pragma once

#include "serialization/apicallcontext.h"

#include <cstdint>

namespace gpa {
namespace serialization {

struct StreamPacketHeader;
class Argument;
class ArgsReader;

struct IFunctionCall
{
    virtual ~IFunctionCall();
    virtual StreamPacketHeader const& GetContext() const = 0;
    virtual char const* GetName() const = 0;
    virtual char const* GetClass() const = 0;
    virtual char const* GetAPI() const = 0;
    virtual uint32_t GetParamsCount() const = 0;
    virtual Argument const* GetParam(uint32_t index, void const** outValue = nullptr, bool postExecute = false) const = 0;
    virtual Argument const* GetReturnValue(void const** outValue = nullptr) const = 0;
    virtual void* GetApiObjectPtr() const = 0;
    virtual uint8_t GetApiToken() const = 0;
    virtual uint16_t GetClassToken() const = 0;
    virtual uint32_t GetFunctionToken() const = 0;

    virtual void Read(ArgsReader* reader = nullptr) = 0;
    virtual void PreWrite() = 0;
    virtual void PostWrite() = 0;

    virtual bool IsSuccessful() = 0;
    virtual void Execute(GPADispatchTable const* dispatchTable) = 0;
};

}  // namespace serialization
}  // namespace gpa