Revise C++ code gen

Remove uses of NATIVE_UINT_TYPE
This commit is contained in:
Robert L. Bocchino Jr 2024-02-27 22:48:34 -08:00
parent 3098c0788f
commit dab91ee1b3
29 changed files with 32 additions and 44 deletions

View File

@ -215,12 +215,6 @@ object CppWriterState {
"FwTimeBaseStoreType" -> zero,
"FwTimeContextStoreType" -> zero,
"FwTlmPacketizeIdType" -> zero,
// For compatibility with the current F Prime code.
// Eventually we should remove these machine-dependent types
// from the FPP model and from the FPP-facing interface
// in F Prime.
"NATIVE_INT_TYPE" -> zero,
"NATIVE_UINT_TYPE" -> zero,
"POINTER_CAST" -> zero,
)

View File

@ -219,7 +219,7 @@ case class StringCppWriter(
None,
"getCapacity",
Nil,
CppDoc.Type("NATIVE_UINT_TYPE"),
CppDoc.Type("Fw::StringBase::SizeType"),
lines("return sizeof(this->m_buf);"),
CppDoc.Function.NonSV,
CppDoc.Function.Const

View File

@ -86,7 +86,7 @@ namespace M {
return this->m_buf;
}
NATIVE_UINT_TYPE S1::StringSize80 ::
Fw::StringBase::SizeType S1::StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -61,7 +61,7 @@ namespace M {
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -84,7 +84,7 @@ const char* String1::StringSize80 ::
return this->m_buf;
}
NATIVE_UINT_TYPE String1::StringSize80 ::
Fw::StringBase::SizeType String1::StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -60,7 +60,7 @@ class String1 :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -84,7 +84,7 @@ const char* String2::StringSize80 ::
return this->m_buf;
}
NATIVE_UINT_TYPE String2::StringSize80 ::
Fw::StringBase::SizeType String2::StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -60,7 +60,7 @@ class String2 :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -84,7 +84,7 @@ const char* S::StringSize80 ::
return this->m_buf;
}
NATIVE_UINT_TYPE S::StringSize80 ::
Fw::StringBase::SizeType S::StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -60,7 +60,7 @@ class S :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -85,7 +85,7 @@ namespace Ports {
return this->m_buf;
}
NATIVE_UINT_TYPE StringSize80 ::
Fw::StringBase::SizeType StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -66,7 +66,7 @@ namespace Ports {
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -85,7 +85,7 @@ namespace Ports {
return this->m_buf;
}
NATIVE_UINT_TYPE StringSize80 ::
Fw::StringBase::SizeType StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -65,7 +65,7 @@ namespace Ports {
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -2,7 +2,7 @@ module Svc {
@ Scheduler Port with order argument
port Sched(
context: NATIVE_UINT_TYPE @< The call order
context: U32 @< The call order
)
}

View File

@ -12,6 +12,4 @@ type FwSizeType
type FwTimeBaseStoreType
type FwTimeContextStoreType
type FwTlmPacketizeIdType
type NATIVE_INT_TYPE
type NATIVE_UINT_TYPE
type POINTER_CAST

View File

@ -83,7 +83,7 @@ namespace StringPortStrings {
return this->m_buf;
}
NATIVE_UINT_TYPE StringSize80 ::
Fw::StringBase::SizeType StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);
@ -162,7 +162,7 @@ namespace StringPortStrings {
return this->m_buf;
}
NATIVE_UINT_TYPE StringSize100 ::
Fw::StringBase::SizeType StringSize100 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -61,7 +61,7 @@ namespace StringPortStrings {
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:
@ -111,7 +111,7 @@ namespace StringPortStrings {
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -84,7 +84,7 @@ const char* Default::StringSize40 ::
return this->m_buf;
}
NATIVE_UINT_TYPE Default::StringSize40 ::
Fw::StringBase::SizeType Default::StringSize40 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -59,7 +59,7 @@ class Default :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -84,7 +84,7 @@ const char* Primitive::StringSize80 ::
return this->m_buf;
}
NATIVE_UINT_TYPE Primitive::StringSize80 ::
Fw::StringBase::SizeType Primitive::StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -61,7 +61,7 @@ class Primitive :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -84,7 +84,7 @@ const char* StringArray::StringSize80 ::
return this->m_buf;
}
NATIVE_UINT_TYPE StringArray::StringSize80 ::
Fw::StringBase::SizeType StringArray::StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);
@ -163,7 +163,7 @@ const char* StringArray::StringSize40 ::
return this->m_buf;
}
NATIVE_UINT_TYPE StringArray::StringSize40 ::
Fw::StringBase::SizeType StringArray::StringSize40 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -59,7 +59,7 @@ class StringArray :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:
@ -109,7 +109,7 @@ class StringArray :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -84,7 +84,7 @@ const char* String::StringSize80 ::
return this->m_buf;
}
NATIVE_UINT_TYPE String::StringSize80 ::
Fw::StringBase::SizeType String::StringSize80 ::
getCapacity() const
{
return sizeof(this->m_buf);
@ -163,7 +163,7 @@ const char* String::StringSize40 ::
return this->m_buf;
}
NATIVE_UINT_TYPE String::StringSize40 ::
Fw::StringBase::SizeType String::StringSize40 ::
getCapacity() const
{
return sizeof(this->m_buf);

View File

@ -59,7 +59,7 @@ class String :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:
@ -109,7 +109,7 @@ class String :
//! Retrieves char buffer of string
const char* toChar() const;
NATIVE_UINT_TYPE getCapacity() const;
Fw::StringBase::SizeType getCapacity() const;
private:

View File

@ -8494,7 +8494,7 @@ equivalent.</p>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2023-12-11 17:49:22 -0800
Last updated 2024-02-27 22:29:34 -0800
</div>
</div>
<script src="code-prettify/run_prettify.js"></script>

View File

@ -11358,8 +11358,6 @@ type FwSizeType
type FwTimeBaseStoreType
type FwTimeContextStoreType
type FwTlmPacketizeIdType
type NATIVE_INT_TYPE
type NATIVE_UINT_TYPE
type POINTER_CAST</pre>
</div>
</div>
@ -11731,7 +11729,7 @@ function, you may.</p>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2023-12-11 17:50:36 -0800
Last updated 2024-02-27 22:30:49 -0800
</div>
</div>
<script src="code-prettify/run_prettify.js"></script>

View File

@ -161,8 +161,6 @@ type FwSizeType
type FwTimeBaseStoreType
type FwTimeContextStoreType
type FwTlmPacketizeIdType
type NATIVE_INT_TYPE
type NATIVE_UINT_TYPE
type POINTER_CAST
----