Skip to content

Commit

Permalink
refactor(ps): use clang-formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
MakarenkoAI committed Dec 8, 2024
1 parent d8dd2f1 commit 367c730
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ ScResult TranslateMainSystemIdtfsFromScToFileAgent::DoProgram(ScAction & action)
if (!systemIdentifier.empty() && !mainIdentifier.empty() && !stringType.empty())
{
streamIdtfs << R"({")" << mainIdentifier << R"(", )"
<< R"({")" << systemIdentifier << R"(", ")" << stringType << R"("}},)" << "\n";
<< R"({")" << systemIdentifier << R"(", ")" << stringType << R"("}},)"
<< "\n";
}
}
catch (utils::ScException const & exception)
Expand Down Expand Up @@ -123,8 +124,7 @@ std::string TranslateMainSystemIdtfsFromScToFileAgent::GetMainIdtfAndVerifyNode(
while (iterator5PtrCheckOnlyOneIdtf->Next())
{
mainAnotherIdentifierLink = iterator5PtrCheckOnlyOneIdtf->Get(2);
isLangRu =
m_context.CheckConnector(ScKeynodes::lang_ru, mainAnotherIdentifierLink, ScType::ConstPermPosArc);
isLangRu = m_context.CheckConnector(ScKeynodes::lang_ru, mainAnotherIdentifierLink, ScType::ConstPermPosArc);

if (isLangRu)
return identifier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ class TranslateMainSystemIdtfsFromScToFileAgent : public ScActionInitiatedAgent
{ScType::VarPermNegArc, "sc_main_arc"},
{ScType::VarTempPosArc, "sc_main_arc"},
{ScType::VarTempNegArc, "sc_main_arc"}};

private:

std::string GetStrScType(ScAddr const & node);
static std::string GetSystemIdtfAndVerifyNode(ScMemoryContext & m_memoryCtx, ScAddr const & node);
static std::string GetMainIdtfAndVerifyNode(ScMemoryContext & m_memoryCtx, ScAddr const & node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,10 @@ ScAddr AddSectionAgent::GenerateSection(
ScAddr newSectionArc = m_context.GenerateConnector(ScType::ConstPermPosArc, decompositionTuple, newSection);
if (m_context.IsElement(lastSection))
{
SC_AGENT_LOG_DEBUG("Last section system identifier is \"" + m_context.GetElementSystemIdentifier(lastSection) + "\".");
SC_AGENT_LOG_DEBUG(
"Last section system identifier is \"" + m_context.GetElementSystemIdentifier(lastSection) + "\".");
ScIterator5Ptr lastSectionIterator = m_context.CreateIterator5(
decompositionTuple,
ScType::ConstPermPosArc,
lastSection,
ScType::ConstTempPosArc,
SectionsKeynodes::rrel_last);
decompositionTuple, ScType::ConstPermPosArc, lastSection, ScType::ConstTempPosArc, SectionsKeynodes::rrel_last);
if (lastSectionIterator->Next())
{
ScAddr previousSectionArc = lastSectionIterator->Get(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ bool RemoveSectionAgent::RemoveSection(ScAddr const & section)
for (size_t i = 0; i < searchResult.Size(); i++)
{
ScAddr parentSection = searchResult[i][sections_aliases::PARENT_SECTION];
SC_AGENT_LOG_DEBUG("Parent section system idtf is " << m_context.GetElementSystemIdentifier(parentSection) << ".");
SC_AGENT_LOG_DEBUG(
"Parent section system idtf is " << m_context.GetElementSystemIdentifier(parentSection) << ".");
HandleSection(searchResult[i], section);
HandleParentSection(searchResult[i], parentSection);
}
Expand Down Expand Up @@ -152,8 +153,7 @@ void RemoveSectionAgent::HandleNeighboringSections(ScAddr const & tuple, ScAddr
// If current element is the first and the last
if (!m_context.IsElement(currentSectionEdge))
{
ScIterator3Ptr currentSectionEdgeIterator =
m_context.CreateIterator3(tuple, ScType::ConstPermPosArc, section);
ScIterator3Ptr currentSectionEdgeIterator = m_context.CreateIterator3(tuple, ScType::ConstPermPosArc, section);
if (currentSectionEdgeIterator->Next())
{
currentSectionEdge = currentSectionEdgeIterator->Get(1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ void sections_builder::buildDecompositionTupleTemplate(
ScType::VarPermPosArc,
SectionsKeynodes::nrel_entity_decomposition);
scTemplate.Triple(
sections_aliases::DECOMPOSITION_TUPLE,
ScType::VarPermPosArc >> sections_aliases::EDGE_TO_DELETE,
childSection);
sections_aliases::DECOMPOSITION_TUPLE, ScType::VarPermPosArc >> sections_aliases::EDGE_TO_DELETE, childSection);
}

void sections_builder::buildDecompositionTupleTemplate(ScTemplate & scTemplate, ScAddr const & section)
Expand Down

0 comments on commit 367c730

Please sign in to comment.