Program Listing for File preplayback-helpers.h

Return to documentation for file (include\playback\preplayback-helpers.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 "igpa-config.h"

namespace gpa {

namespace serialization {
struct Context;
}  // namespace serialization

namespace playback {

class ObjectMap;

template<typename T>
inline void UpdateObjects(T& /*obj*/, playback::Context* /*context*/)
{
}

template<typename T>
inline void UpdateObjects(T const& obj, playback::Context* context)
{
    UpdateObjects(const_cast<T&>(obj), context);
}

template<typename T>
inline void UpdateObjects(T* objArray, size_t const count, playback::Context* context)
{
    if (objArray == nullptr) {
        return;
    }

    for (size_t ii = 0; ii < count; ++ii) {
        UpdateObjects(objArray[ii], context);
    }
}

}  // namespace playback
}  // namespace gpa