//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a RdGen v1.13.
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
#include "ScriptCallStack.Pregenerated.h"



#ifdef _MSC_VER
#pragma warning( push )
#pragma warning( disable:4250 )
#pragma warning( disable:4307 )
#pragma warning( disable:4267 )
#pragma warning( disable:4244 )
#pragma warning( disable:4100 )
#endif

namespace JetBrains {
namespace EditorPlugin {
// companion
// constants
// initializer
void ScriptCallStack::initialize()
{
}
// primary ctor
ScriptCallStack::ScriptCallStack(TArray<rd::Wrapper<ScriptCallStackFrame>> frames_) :
IScriptCallStack()
,frames_(std::move(frames_))
{
    initialize();
}
// secondary constructor
// default ctors and dtors
// reader
ScriptCallStack ScriptCallStack::read(rd::SerializationCtx& ctx, rd::Buffer & buffer)
{
    auto frames_ = buffer.read_array<TArray, ScriptCallStackFrame, FDefaultAllocator>(
    [&ctx, &buffer]() mutable  
    { return ScriptCallStackFrame::read(ctx, buffer); }
    );
    ScriptCallStack res{std::move(frames_)};
    return res;
}
// writer
void ScriptCallStack::write(rd::SerializationCtx& ctx, rd::Buffer& buffer) const
{
    buffer.write_array<TArray, ScriptCallStackFrame, FDefaultAllocator>(frames_, 
    [&ctx, &buffer](ScriptCallStackFrame const & it) mutable  -> void 
    { rd::Polymorphic<std::decay_t<decltype(it)>>::write(ctx, buffer, it); }
    );
}
// virtual init
// identify
// getters
TArray<rd::Wrapper<ScriptCallStackFrame>> const & ScriptCallStack::get_frames() const
{
    return frames_;
}
// intern
// equals trait
bool ScriptCallStack::equals(rd::ISerializable const& object) const
{
    auto const &other = dynamic_cast<ScriptCallStack const&>(object);
    if (this == &other) return true;
    if (this->frames_ != other.frames_) return false;
    
    return true;
}
// equality operators
bool operator==(const ScriptCallStack &lhs, const ScriptCallStack &rhs) {
    if (lhs.type_name() != rhs.type_name()) return false;
    return lhs.equals(rhs);
}
bool operator!=(const ScriptCallStack &lhs, const ScriptCallStack &rhs){
    return !(lhs == rhs);
}
// hash code trait
size_t ScriptCallStack::hashCode() const noexcept
{
    size_t __r = 0;
    __r = __r * 31 + (rd::contentDeepHashCode(get_frames()));
    return __r;
}
// type name trait
std::string ScriptCallStack::type_name() const
{
    return "ScriptCallStack";
}
// static type name trait
std::string ScriptCallStack::static_type_name()
{
    return "ScriptCallStack";
}
// polymorphic to string
std::string ScriptCallStack::toString() const
{
    std::string res = "ScriptCallStack\n";
    res += "\tframes = ";
    res += rd::to_string(frames_);
    res += '\n';
    return res;
}
// external to string
std::string to_string(const ScriptCallStack & value)
{
    return value.toString();
}
}
}

#ifdef _MSC_VER
#pragma warning( pop )
#endif

