Program Listing for File token.h

Return to documentation for file (include\serialization\token.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/common.h"
#include <cstdint>

namespace gpa {
namespace serialization {

struct GPAToken
{
    GPAToken();
    GPAToken(uint8_t _api, uint16_t _class, uint32_t _function);
    bool operator==(GPAToken const& other) const;
    bool operator!=(GPAToken const& other) const;

    uint32_t _function;
    uint16_t _class;  // is this enough precision to avoid collision?
    uint8_t _api;     // is this the right amount of precision?
    uint8_t _reserved;
};

bool IsSameApiToken(GPAToken const, GPAToken const);
bool IsSameClassToken(GPAToken const, GPAToken const);
bool IsSameFunctionToken(GPAToken const, GPAToken const);

}  // namespace serialization
}  // namespace gpa