Skip to content

Commit 64d8991

Browse files
Adjusted documentation to refer to etl instead of estd
1 parent 1feb1bd commit 64d8991

File tree

20 files changed

+46
-159
lines changed

20 files changed

+46
-159
lines changed

doc/codingGuidelines/codeFormatting/for_c++/formatting.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,10 +383,10 @@ Spaces
383383
.. code-block:: C++
384384

385385
// good
386-
estd::example<uint8_t> numbers{1, 2, 3, 4};
386+
etl::example<uint8_t> numbers{1, 2, 3, 4};
387387

388388
// bad
389-
estd::example<uint8_t> numbers{ 1, 2, 3, 4 };
389+
etl::example<uint8_t> numbers{ 1, 2, 3, 4 };
390390

391391
.. code-block::
392392
:caption: clang-format settings

doc/codingGuidelines/conventions/classes.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,24 +322,24 @@ also disable move construction:
322322
323323
324324
Before the adoption of the C++11 standard, ``UNCOPYABLE`` macro from ``estd`` library was used.
325-
Now that functions can be marked as deleted, ``estd/uncopyable.h`` is considered obsolete and should
326-
be avoided.
327325

328326

329327
Indestructible
330328
--------------
331329

332-
To avoid destructions of objects, use the ``estd::indestructible`` wrapper. The type will
330+
To avoid destructions of objects, use the ``etl::typed_storage`` wrapper. The type will
333331
become `trivially destructible
334332
<http://www.cplusplus.com/reference/type_traits/is_trivially_destructible/>`_.
335333

336334
In the following example the object of type `YourType` will be constructed with placement-new,
337335
but never destructed even when `wrapper` gets destructed. The destructor of `YourType` will never be
338-
called:
336+
called, except if you call destroy() explicitly:
339337

340338
.. code-block:: cpp
341339
342-
estd::indestructible<YourType> wrapper;
340+
etl::typed_storage<YourType> wrapper;
341+
wrapper.create();
342+
343343
344344
Avoid Protected Data
345345
--------------------

doc/codingGuidelines/conventions/enumerations.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ most cases ``uint8_t``.
8080
One advantage is that variables can now be compared with the scope resolution operator.
8181
A drawback is that there is no direct conversion from the values of a scoped enumerator to the
8282
underlying type.
83-
Use ``::estd::to_underlying`` from ``estd/type_utils.h`` to cast the enumeration value to the
83+
Use ``::etl::to_underlying`` from ``etl/utility.h`` to cast the enumeration value to the
8484
underlying type.
8585

8686
.. code-block:: cpp
8787
88-
#include <estd/type_utils.h>
88+
#include <etl/utility.h>
8989
9090
// recommended definition
9191
enum class Colors : uint8_t
@@ -104,8 +104,8 @@ underlying type.
104104
case Colors::BLUE : printf("Blue color\n"); break;
105105
}
106106
107-
// option 1: (recommended) use the estd helper function
108-
auto const colorRed = ::estd::to_underlying(Colors::RED);
107+
// option 1: (recommended) use the etl helper function
108+
auto const colorRed = ::etl::to_underlying(Colors::RED);
109109
// option 2: explicitly cast using the underlying type
110110
auto const colorGreen = static_cast<::std::underlying_type<Colors>::type>(Colors::GREEN);
111111
// option 3: explicitly cast to the specified type

doc/codingGuidelines/conventions/files.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Standard Headers
1919
----------------
2020

2121
- See `C++ Standard Library headers <https://en.cppreference.com/w/cpp/header>`_ for details.
22-
Note, that not all includes make sense in embedded code. Some parts are replaced by our own
23-
``estd`` library.
22+
Note that not all includes make sense in embedded code. Some parts are replaced by the
23+
``etl`` library.
2424
- :rule:`FILE-010` If a file needs to be compiled for C++ and C, use the C headers.
2525
- :rule:`FILE-011` For C++ standard types, include ``<platform/estdint.h>``. It'll behave as if you
2626
included ``<cstdint>`` and ``<cstddef>`` and allow the usage of ``size_t`` directly without the

doc/codingGuidelines/conventions/functions.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ Code that uses raw byte arrays and a length are very prone to errors or misuse.
113113
void start(Connection& conn, uint8_t data[], uint16_t length);
114114
115115
It's unclear from the method signature what will happen to data and length.
116-
Look for existing buffer classes and reuse one of those, for example ``estd::array<>`` or
117-
``estd::slice<>``.
116+
Look for existing buffer classes and reuse one of those, for example ``etl::array<>`` or
117+
``etl::span<>``.
118118

119119

120120
Translation-Unit Local Functions
@@ -147,5 +147,5 @@ where we have the certainty that they are supported.
147147

148148
When using lambdas, be careful about object lifetimes: objects captured by reference within a lambda
149149
have to be still in scope at the time of lambda execution. Also lambda objects themselves have to
150-
still exist when they're executed - it might be tricky while using function references like
151-
``estd::function``.
150+
still exist when they're executed. A solution to this issue is implemented in
151+
``etl::inplace_function``.

doc/codingGuidelines/conventions/naming.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Type Names
4848
using TcpipEventManager = ::os::EventManager<task_tcpip>;
4949
5050
Any exceptions to this rule need to have a reasonable justification and in that
51-
case should be applied consistently within a module (e.g. ``estd`` types use
51+
case should be applied consistently within a module (e.g. ``etl`` types use
5252
*snake_case* notation in order to match with their STL counterpart). In general
5353
those exceptions should be rare!
5454

@@ -184,7 +184,7 @@ does not provide any functions, you can omit the prefix.
184184
185185
class CanTransceiver // good
186186
{
187-
::estd::forward_list<ICanFrameListener> _listeners;
187+
::etl::intrusive_forward_list<ICanFrameListener, ::etl::forward_link<0>> _listeners;
188188
};
189189
190190
struct Result // good
@@ -196,7 +196,7 @@ does not provide any functions, you can omit the prefix.
196196
197197
class CanTransceiver // bad, no member prefix
198198
{
199-
::estd::forward_list<ICanFrameListener> listeners;
199+
::etl::intrusive_forward_list<ICanFrameListener, ::etl::forward_link<0>> listeners;
200200
};
201201
202202
struct Result // bad, suffix and mixed style
@@ -316,7 +316,7 @@ Boolean Variables and Functions
316316
- might need conversion if propagated to higher levels
317317

318318
Other rarely used types are `bitfields` and `ranges`. For return values of functions it is
319-
worth to look at ``::estd::result`` class which combines data and error status in one object.
319+
worth to look at ``::etl::expected`` class which combines data and error status in one object.
320320

321321
In most cases using a boolean is the best choice to keep it simple.
322322

@@ -328,7 +328,7 @@ type of the variable and the operations that can be performed on its elements.
328328

329329
.. code-block:: cpp
330330
331-
using ReceiverList = ::estd::forward_list<Receiver>;
331+
using ReceiverList = ::etl::intrusive_forward_list<Receiver, ::etl::forward_link<0>>;
332332
333333
vector<Point> points;
334334
int values[];

doc/codingGuidelines/conventions/statements.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,12 +211,12 @@ which improves readability. Additionally, ``using`` can be used for template ali
211211

212212
.. code-block:: cpp
213213
214-
using MyArray = ::estd::array<::some::other::Type, 199>; // good - new name comes first
214+
using MyArray = ::etl::array<::some::other::Type, 199>; // good - new name comes first
215215
216-
typedef ::estd::array<::some::other::Type, 199> MyArray; // bad - new name at the end
216+
typedef ::etl::array<::some::other::Type, 199> MyArray; // bad - new name at the end
217217
218218
template <typename T>
219-
using ArrayOf5 = ::estd::array<T, 5>; // template alias - impossible with typedef
219+
using ArrayOf5 = ::etl::array<T, 5>; // template alias - impossible with typedef
220220
221221
OS Specific Code
222222
----------------

libs/bsw/async/doc/user/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ scheduleAtFixedRate Allows to schedule a ``async::RunnableType`` to be run per
2121

2222
The ``util/Call.h`` declares a runnable class that allows customized implementation on execution
2323
by providing callable object (with *function call* operator ``()``).
24-
For example the predefined ``async::Function`` type is declaring ``::estd::function`` as callable type.
24+
For example the predefined ``async::Function`` type is declaring ``::etl::inplace_function`` as callable type.
2525

2626
The ``util/MemberCall.h`` provides a ``async::MemberCall`` class, which allows to create a ``async::RunnableType``
2727
from a member function of a non-runnable class.

libs/bsw/io/doc/user/buffered_writer.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Properties
1616
* Internally the ``BufferedWriter`` manages slices of ``destination.maxSize()`` bytes and
1717
provides subslices of it to the user.
1818
* Call to ``flush()`` required to commit currently buffered data.
19-
* **Memory consumption**: ``sizeof(::io::IWriter&) + sizeof(::estd::slice<uint8_t>) + sizeof(size_t)``
19+
* **Memory consumption**: ``sizeof(::io::IWriter&) + sizeof(::etl::span<uint8_t>) + sizeof(size_t)``
2020

2121
Public API
2222
----------

libs/bsw/io/doc/user/forwarding_reader.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ side, the ``ForwardingReader`` allows forking a data stream at the reader side o
1212
Properties
1313
----------
1414

15-
* **Memory consumption**: ``sizeof(IReader&) + sizeof(IWriter&) + (sizeof(::estd::slice<uint8_t>) * 2)``
15+
* **Memory consumption**: ``sizeof(IReader&) + sizeof(IWriter&) + (sizeof(::etl::span<uint8_t>) * 2)``
1616

1717
Public API
1818
----------

0 commit comments

Comments
 (0)