Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MakarenkoAI committed Sep 19, 2024
1 parent a85147c commit 8dd32b5
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,6 @@ ScAddr TranslateMainSystemIdtfsFromScToFileAgent::GetActionClass() const
return IdentifiersKeynodes::action_find_identifiers;
}

bool TranslateMainSystemIdtfsFromScToFileAgent::CheckAction(ScAddr const & actionAddr)
{
return m_context.CheckConnector(
IdentifiersKeynodes::action_find_identifiers, actionAddr, ScType::EdgeAccessConstPosPerm);
}

std::string TranslateMainSystemIdtfsFromScToFileAgent::GetSystemIdtfAndVerifyNode(
ScMemoryContext & m_context,
ScAddr const & node)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ class TranslateMainSystemIdtfsFromScToFileAgent : public ScActionInitiatedAgent
{ScType::EdgeAccessVarFuzTemp, "sc_edge_main"}};

private:
bool CheckAction(ScAddr const & actionAddr);

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 @@ -59,11 +59,6 @@ ScAddr AddSectionAgent::GetActionClass() const
return SectionsKeynodes::action_add_section;
}

bool AddSectionAgent::CheckActionClass(ScAddr const & actionNode)
{
return m_context.CheckConnector(SectionsKeynodes::action_add_section, actionNode, ScType::EdgeAccessConstPosPerm);
}

ScAddr AddSectionAgent::GenerateSection(
std::string const & sectionName,
ScAddr const & parentSection,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class AddSectionAgent : public ScActionInitiatedAgent
ScResult DoProgram(ScActionInitiatedEvent const & event, ScAction & action) override;

private:
bool CheckActionClass(ScAddr const & actionNode);

ScAddr GenerateSection(std::string const & sectionName, ScAddr const & parentSection, ScAddr const & lang);

ScAddr GenerateSection(std::string const & sectionName, ScAddr const & lang);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ ScAddr GetDecompositionAgent::GetActionClass() const
return SectionsKeynodes::action_get_decomposition;
}

bool GetDecompositionAgent::CheckActionClass(ScAddr const & actionNode)
{
return m_context.CheckConnector(
SectionsKeynodes::action_get_decomposition, actionNode, ScType::EdgeAccessConstPosPerm);
}

ScAddrVector GetDecompositionAgent::GetDecomposition(ScAddr const & subjDomainAddr, ScAddr const & decompositionAddr)
{
SC_AGENT_LOG_DEBUG("Main section is " << m_context.GetElementSystemIdentifier(subjDomainAddr) << ".");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ class GetDecompositionAgent : public ScActionInitiatedAgent
ScResult DoProgram(ScActionInitiatedEvent const & event, ScAction & action) override;

private:
bool CheckActionClass(ScAddr const & actionNode);

json GetJSONDecomposition(ScAddrVector const &, size_t, ScAddr const &, ScAddr const &);

ScAddrVector GetDecomposition(ScAddr const &, ScAddr const &);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@ ScAddr RemoveSectionAgent::GetActionClass() const
return SectionsKeynodes::action_remove_section;
}

bool RemoveSectionAgent::CheckActionClass(ScAddr const & actionNode)
{
return m_context.CheckConnector(SectionsKeynodes::action_remove_section, actionNode, ScType::EdgeAccessConstPosPerm);
}

bool RemoveSectionAgent::RemoveSection(ScAddr const & section, ScAddr const & parentSection)
{
SC_AGENT_LOG_DEBUG("Section system idtf is " + m_context.GetElementSystemIdentifier(section) + ".");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ class RemoveSectionAgent : public ScActionInitiatedAgent
ScResult DoProgram(ScActionInitiatedEvent const & event, ScAction & action) override;

private:
bool CheckActionClass(ScAddr const & actionNode);

bool RemoveSection(ScAddr const & section, ScAddr const & parentSection);

bool RemoveSection(ScAddr const & section);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ ScAddr sections_utils::GetSectionDecompositionTuple(ScMemoryContext * context, S
ScTemplateResultItem genResult;
context->GenerateByTemplate(scTemplate, genResult);

if (genResult.Size() != 0)
return genResult[sections_aliases::DECOMPOSITION_TUPLE];
return {};
return genResult[sections_aliases::DECOMPOSITION_TUPLE];
}

ScAddr sections_utils::FindSectionByName(ScMemoryContext * context, std::string const & sectionName)
Expand Down

0 comments on commit 8dd32b5

Please sign in to comment.