Skip to content

Commit

Permalink
Remove private parameter getter
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffany1618 committed Jun 21, 2023
1 parent b94b847 commit 0f2494d
Show file tree
Hide file tree
Showing 19 changed files with 1 addition and 326 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ case class ComponentParameters (
def getPrivateFunctionMembers: List[CppDoc.Class.Member] = {
if !hasParameters then Nil
else List(
getPrivateGetter,
getSetters,
getSaveFunctions
).flatten
Expand Down Expand Up @@ -260,42 +259,6 @@ case class ComponentParameters (
)
}

private def getPrivateGetter: List[CppDoc.Class.Member] = {
addAccessTagAndComment(
"PRIVATE",
"Private parameter get function",
List(
functionClassMember(
Some(
"""|Get a parameter by ID
|
|\return Whether the parameter is valid
|"""
),
"getParam",
List(
CppDoc.Function.Param(
CppDoc.Type("FwPrmIdType"),
"id",
Some("The ID")
),
CppDoc.Function.Param(
CppDoc.Type("Fw::ParamBuffer&"),
"buff",
Some("The parameter value")
)
),
CppDoc.Type("Fw::ParamValid"),
wrapInIfElse(
s"this->${portVariableName(prmGetPort.get)}[0].isConnected()",
lines(s"return this->${portVariableName(prmGetPort.get)}[0].invoke(id, buff);"),
lines("return Fw::ParamValid::INVALID;")
)
)
)
)
}

private def getSetters: List[CppDoc.Class.Member] = {
addAccessTagAndComment(
"PRIVATE",
Expand Down Expand Up @@ -401,4 +364,4 @@ case class ComponentParameters (
private def paramVariableName(name: String) =
s"m_$name"

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3390,24 +3390,6 @@ void ActiveParamsComponentBase ::
);
}

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

Fw::ParamValid ActiveParamsComponentBase ::
getParam(
FwPrmIdType id,
Fw::ParamBuffer& buff
)
{
if (this->m_prmGetOut_OutputPort[0].isConnected()) {
return this->m_prmGetOut_OutputPort[0].invoke(id, buff);
}
else {
return Fw::ParamValid::INVALID;
}
}

// ----------------------------------------------------------------------
// Parameter set functions
// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1294,20 +1294,6 @@ class ActiveParamsComponentBase :
const S& s //!< A struct
);

PRIVATE:

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

//! Get a parameter by ID
//!
//! \return Whether the parameter is valid
Fw::ParamValid getParam(
FwPrmIdType id, //!< The ID
Fw::ParamBuffer& buff //!< The parameter value
);

PRIVATE:

// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7277,24 +7277,6 @@ void ActiveSerialComponentBase ::

#endif

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

Fw::ParamValid ActiveSerialComponentBase ::
getParam(
FwPrmIdType id,
Fw::ParamBuffer& buff
)
{
if (this->m_prmGetOut_OutputPort[0].isConnected()) {
return this->m_prmGetOut_OutputPort[0].invoke(id, buff);
}
else {
return Fw::ParamValid::INVALID;
}
}

// ----------------------------------------------------------------------
// Parameter set functions
// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2286,20 +2286,6 @@ class ActiveSerialComponentBase :

#endif

PRIVATE:

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

//! Get a parameter by ID
//!
//! \return Whether the parameter is valid
Fw::ParamValid getParam(
FwPrmIdType id, //!< The ID
Fw::ParamBuffer& buff //!< The parameter value
);

PRIVATE:

// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6437,24 +6437,6 @@ void ActiveTestComponentBase ::
);
}

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

Fw::ParamValid ActiveTestComponentBase ::
getParam(
FwPrmIdType id,
Fw::ParamBuffer& buff
)
{
if (this->m_prmGetOut_OutputPort[0].isConnected()) {
return this->m_prmGetOut_OutputPort[0].invoke(id, buff);
}
else {
return Fw::ParamValid::INVALID;
}
}

// ----------------------------------------------------------------------
// Parameter set functions
// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1945,20 +1945,6 @@ class ActiveTestComponentBase :
const S& s //!< A struct
);

PRIVATE:

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

//! Get a parameter by ID
//!
//! \return Whether the parameter is valid
Fw::ParamValid getParam(
FwPrmIdType id, //!< The ID
Fw::ParamBuffer& buff //!< The parameter value
);

PRIVATE:

// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2136,24 +2136,6 @@ void PassiveParamsComponentBase ::
);
}

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

Fw::ParamValid PassiveParamsComponentBase ::
getParam(
FwPrmIdType id,
Fw::ParamBuffer& buff
)
{
if (this->m_prmGetOut_OutputPort[0].isConnected()) {
return this->m_prmGetOut_OutputPort[0].invoke(id, buff);
}
else {
return Fw::ParamValid::INVALID;
}
}

// ----------------------------------------------------------------------
// Parameter set functions
// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -992,20 +992,6 @@ class PassiveParamsComponentBase :
const S& s //!< A struct
);

PRIVATE:

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

//! Get a parameter by ID
//!
//! \return Whether the parameter is valid
Fw::ParamValid getParam(
FwPrmIdType id, //!< The ID
Fw::ParamBuffer& buff //!< The parameter value
);

PRIVATE:

// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4316,24 +4316,6 @@ void PassiveSerialComponentBase ::

#endif

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

Fw::ParamValid PassiveSerialComponentBase ::
getParam(
FwPrmIdType id,
Fw::ParamBuffer& buff
)
{
if (this->m_prmGetOut_OutputPort[0].isConnected()) {
return this->m_prmGetOut_OutputPort[0].invoke(id, buff);
}
else {
return Fw::ParamValid::INVALID;
}
}

// ----------------------------------------------------------------------
// Parameter set functions
// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1614,20 +1614,6 @@ class PassiveSerialComponentBase :

#endif

PRIVATE:

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

//! Get a parameter by ID
//!
//! \return Whether the parameter is valid
Fw::ParamValid getParam(
FwPrmIdType id, //!< The ID
Fw::ParamBuffer& buff //!< The parameter value
);

PRIVATE:

// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4029,24 +4029,6 @@ void PassiveTestComponentBase ::
);
}

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

Fw::ParamValid PassiveTestComponentBase ::
getParam(
FwPrmIdType id,
Fw::ParamBuffer& buff
)
{
if (this->m_prmGetOut_OutputPort[0].isConnected()) {
return this->m_prmGetOut_OutputPort[0].invoke(id, buff);
}
else {
return Fw::ParamValid::INVALID;
}
}

// ----------------------------------------------------------------------
// Parameter set functions
// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1436,20 +1436,6 @@ class PassiveTestComponentBase :
const S& s //!< A struct
);

PRIVATE:

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

//! Get a parameter by ID
//!
//! \return Whether the parameter is valid
Fw::ParamValid getParam(
FwPrmIdType id, //!< The ID
Fw::ParamBuffer& buff //!< The parameter value
);

PRIVATE:

// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3395,24 +3395,6 @@ void QueuedParamsComponentBase ::
);
}

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

Fw::ParamValid QueuedParamsComponentBase ::
getParam(
FwPrmIdType id,
Fw::ParamBuffer& buff
)
{
if (this->m_prmGetOut_OutputPort[0].isConnected()) {
return this->m_prmGetOut_OutputPort[0].invoke(id, buff);
}
else {
return Fw::ParamValid::INVALID;
}
}

// ----------------------------------------------------------------------
// Parameter set functions
// ----------------------------------------------------------------------
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1294,20 +1294,6 @@ class QueuedParamsComponentBase :
const S& s //!< A struct
);

PRIVATE:

// ----------------------------------------------------------------------
// Private parameter get function
// ----------------------------------------------------------------------

//! Get a parameter by ID
//!
//! \return Whether the parameter is valid
Fw::ParamValid getParam(
FwPrmIdType id, //!< The ID
Fw::ParamBuffer& buff //!< The parameter value
);

PRIVATE:

// ----------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 0f2494d

Please sign in to comment.