Files
o3de/Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToCPlusPlus.h
T
Steve Pham 38261d0800 Shorten copyright headers by splitting into 2 lines (#2213)
* Updated all copyright headers to split the longer original copyright line into 2 shorter lines

Signed-off-by: Steve Pham <spham@amazon.com>
2021-07-16 15:25:48 -07:00

61 lines
1.9 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <AzCore/Outcome/Outcome.h>
#include "TranslationUtilities.h"
#include "GraphToX.h"
namespace ScriptCanvas
{
class Graph;
namespace Grammar
{
class AbstractCodeModel;
}
namespace Translation
{
class GraphToCPlusPlus
: public GraphToX
{
public:
static AZ::Outcome<void, AZStd::pair<AZStd::string, AZStd::string>> Translate(const Grammar::AbstractCodeModel& model, AZStd::string& dotH, AZStd::string& dotCPP);
AZ_INLINE bool IsSuccessfull() const { return false; }
private:
// cpp only
Writer m_dotH;
Writer m_dotCPP;
GraphToCPlusPlus(const Grammar::AbstractCodeModel& model);
void TranslateClassClose();
void TranslateClassOpen();
void TranslateConstruction();
void TranslateDependencies();
void TranslateDependenciesDotH();
void TranslateDependenciesDotCPP();
void TranslateDestruction();
void TranslateFunctions();
void TranslateHandlers();
void TranslateNamespaceOpen();
void TranslateNamespaceClose();
void TranslateStartNode();
void TranslateVariables();
void WriteHeader(); // Write, not translate, because this should be less dependent on the contents of the graph
void WriteHeaderDotH(); // Write, not translate, because this should be less dependent on the contents of the graph
void WriteHeaderDotCPP(); // Write, not translate, because this should be less dependent on the contents of the graph
};
}
}