Skip to content

Commit

Permalink
apidocs
Browse files Browse the repository at this point in the history
  • Loading branch information
oir committed Jul 20, 2024
1 parent c1b40e4 commit ceb9b4a
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 16 deletions.
10 changes: 8 additions & 2 deletions docs/api/Classes/classbarkeep_1_1_animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Inherited by [`barkeep::Status`](api/Classes/classbarkeep_1_1_status.md)

| | Name |
| -------------- | -------------- |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_animation.md#function-render_)**(const std::string & end = " ") override</span><br>Render a display: animation, progress bar, etc. |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_animation.md#function-render_)**(bool redraw = false, const std::string & end = " ") override</span><br>Render a display: animation, progress bar, etc. |
| <span class="codey"> virtual [Duration](api/Namespaces/namespacebarkeep.md#using-duration) </span>| <span class="codey"> **[default_interval_](api/Classes/classbarkeep_1_1_animation.md#function-default_interval_)**() const override</span> |


Expand Down Expand Up @@ -88,7 +88,7 @@ Inherited by [`barkeep::Status`](api/Classes/classbarkeep_1_1_status.md)

| | Name |
| -------------- | -------------- |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**()</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**(bool redraw = false)</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">long </span>| <span class="codey">**[render_message_](api/Classes/classbarkeep_1_1_async_display.md#function-render_message_)**() const</span><br>Display the message to output stream. |
| <span class="codey">virtual void </span>| <span class="codey">**[start](api/Classes/classbarkeep_1_1_async_display.md#function-start)**()</span><br>Start the display but do not show. This typically means start measuring speed if applicable, without displaying anything. |
| <span class="codey">virtual void </span>| <span class="codey">**[join](api/Classes/classbarkeep_1_1_async_display.md#function-join)**()</span><br>Join the display thread. Protected because python bindings need to override to handle GIL. |
Expand Down Expand Up @@ -198,12 +198,18 @@ inline virtual std::unique_ptr< AsyncDisplay > clone() const override

```cpp
inline virtual long render_(
bool redraw = false,
const std::string & end = " "
) override
```

Render a display: animation, progress bar, etc.

**Parameters**:

* **redraw** If true, display is assumed to be redrawn. This, e.g. means an [Animation](api/Classes/classbarkeep_1_1_animation.md) should not increment the still frame index.


**Return**: Number of `\n` characters in the display.

**Reimplements**: [`barkeep::AsyncDisplay::render_`](api/Classes/classbarkeep_1_1_async_display.md#function-render_)
Expand Down
19 changes: 16 additions & 3 deletions docs/api/Classes/classbarkeep_1_1_async_display.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ Inherited by [`barkeep::Animation`](api/Classes/classbarkeep_1_1_animation.md),

| | Name |
| -------------- | -------------- |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_async_display.md#function-render_)**(const std::string & end = " ") = 0</span><br>Render a display: animation, progress bar, etc. |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_async_display.md#function-render_)**(bool redraw = false, const std::string & end = " ") = 0</span><br>Render a display: animation, progress bar, etc. |
| <span class="codey"> virtual [Duration](api/Namespaces/namespacebarkeep.md#using-duration) </span>| <span class="codey"> **[default_interval_](api/Classes/classbarkeep_1_1_async_display.md#function-default_interval_)**() const = 0</span> |
| <span class="codey"> void </span>| <span class="codey"> **[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**()</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey"> void </span>| <span class="codey"> **[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**(bool redraw = false)</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey"> long </span>| <span class="codey"> **[render_message_](api/Classes/classbarkeep_1_1_async_display.md#function-render_message_)**() const</span><br>Display the message to output stream. |
| <span class="codey"> virtual void </span>| <span class="codey"> **[start](api/Classes/classbarkeep_1_1_async_display.md#function-start)**()</span><br>Start the display but do not show. This typically means start measuring speed if applicable, without displaying anything. |
| <span class="codey"> virtual void </span>| <span class="codey"> **[join](api/Classes/classbarkeep_1_1_async_display.md#function-join)**()</span><br>Join the display thread. Protected because python bindings need to override to handle GIL. |
Expand Down Expand Up @@ -153,12 +153,18 @@ virtual std::unique_ptr< AsyncDisplay > clone() const = 0

```cpp
virtual long render_(
bool redraw = false,
const std::string & end = " "
) = 0
```

Render a display: animation, progress bar, etc.

**Parameters**:

* **redraw** If true, display is assumed to be redrawn. This, e.g. means an [Animation](api/Classes/classbarkeep_1_1_animation.md) should not increment the still frame index.


**Return**: Number of `\n` characters in the display.

**Reimplemented by**: [`barkeep::Animation::render_`](api/Classes/classbarkeep_1_1_animation.md#function-render_), [`barkeep::Status::render_`](api/Classes/classbarkeep_1_1_status.md#function-render_), [`barkeep::Composite::render_`](api/Classes/classbarkeep_1_1_composite.md#function-render_), [`barkeep::Counter::render_`](api/Classes/classbarkeep_1_1_counter.md#function-render_), [`barkeep::ProgressBar::render_`](api/Classes/classbarkeep_1_1_progress_bar.md#function-render_)
Expand All @@ -177,11 +183,18 @@ virtual Duration default_interval_() const = 0
### function `display_`

```cpp
inline void display_()
inline void display_(
bool redraw = false
)
```

Display everything (message, maybe with animation, progress bar, etc).

**Parameters**:

* **redraw** If true, display is assumed to be redrawn. This, e.g. means an [Animation](api/Classes/classbarkeep_1_1_animation.md) should not increment the still frame index.


### function `render_message_`

```cpp
Expand Down
10 changes: 8 additions & 2 deletions docs/api/Classes/classbarkeep_1_1_composite.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Inherits from [`barkeep::AsyncDisplay`](api/Classes/classbarkeep_1_1_async_displ

| | Name |
| -------------- | -------------- |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_composite.md#function-render_)**(const std::string & end = " ") override</span><br>Render a display: animation, progress bar, etc. |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_composite.md#function-render_)**(bool redraw = false, const std::string & end = " ") override</span><br>Render a display: animation, progress bar, etc. |
| <span class="codey"> virtual [Duration](api/Namespaces/namespacebarkeep.md#using-duration) </span>| <span class="codey"> **[default_interval_](api/Classes/classbarkeep_1_1_composite.md#function-default_interval_)**() const override</span> |
| <span class="codey"> virtual void </span>| <span class="codey"> **[start](api/Classes/classbarkeep_1_1_composite.md#function-start)**() override</span><br>Start the display but do not show. This typically means start measuring speed if applicable, without displaying anything. |

Expand Down Expand Up @@ -75,7 +75,7 @@ Inherits from [`barkeep::AsyncDisplay`](api/Classes/classbarkeep_1_1_async_displ

| | Name |
| -------------- | -------------- |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**()</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**(bool redraw = false)</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">long </span>| <span class="codey">**[render_message_](api/Classes/classbarkeep_1_1_async_display.md#function-render_message_)**() const</span><br>Display the message to output stream. |
| <span class="codey">virtual void </span>| <span class="codey">**[join](api/Classes/classbarkeep_1_1_async_display.md#function-join)**()</span><br>Join the display thread. Protected because python bindings need to override to handle GIL. |

Expand Down Expand Up @@ -162,12 +162,18 @@ inline virtual std::unique_ptr< AsyncDisplay > clone() const override

```cpp
inline virtual long render_(
bool redraw = false,
const std::string & end = " "
) override
```

Render a display: animation, progress bar, etc.

**Parameters**:

* **redraw** If true, display is assumed to be redrawn. This, e.g. means an [Animation](api/Classes/classbarkeep_1_1_animation.md) should not increment the still frame index.


**Return**: Number of `\n` characters in the display.

**Reimplements**: [`barkeep::AsyncDisplay::render_`](api/Classes/classbarkeep_1_1_async_display.md#function-render_)
Expand Down
5 changes: 3 additions & 2 deletions docs/api/Classes/classbarkeep_1_1_counter.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Inherits from [`barkeep::AsyncDisplay`](api/Classes/classbarkeep_1_1_async_displ
| | Name |
| -------------- | -------------- |
| <span class="codey"> void </span>| <span class="codey"> **[render_counts_](api/Classes/classbarkeep_1_1_counter.md#function-render_counts_)**(const std::string & end = " ")</span><br>Write the value of progress to the output stream. |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_counter.md#function-render_)**(const std::string & end = " ") override</span><br>Write the value of progress with the message to the output stream. |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_counter.md#function-render_)**(bool = false, const std::string & end = " ") override</span><br>Write the value of progress with the message to the output stream. |
| <span class="codey"> virtual [Duration](api/Namespaces/namespacebarkeep.md#using-duration) </span>| <span class="codey"> **[default_interval_](api/Classes/classbarkeep_1_1_counter.md#function-default_interval_)**() const override</span><br>Default interval in which the display is refreshed, if interval() is not invoked. |
| <span class="codey"> virtual void </span>| <span class="codey"> **[start](api/Classes/classbarkeep_1_1_counter.md#function-start)**() override</span><br>Start the display but do not show. This typically means start measuring speed if applicable, without displaying anything. |

Expand Down Expand Up @@ -78,7 +78,7 @@ Inherits from [`barkeep::AsyncDisplay`](api/Classes/classbarkeep_1_1_async_displ

| | Name |
| -------------- | -------------- |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**()</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**(bool redraw = false)</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">long </span>| <span class="codey">**[render_message_](api/Classes/classbarkeep_1_1_async_display.md#function-render_message_)**() const</span><br>Display the message to output stream. |
| <span class="codey">virtual void </span>| <span class="codey">**[join](api/Classes/classbarkeep_1_1_async_display.md#function-join)**()</span><br>Join the display thread. Protected because python bindings need to override to handle GIL. |

Expand Down Expand Up @@ -195,6 +195,7 @@ Write the value of progress to the output stream.

```cpp
inline virtual long render_(
bool = false,
const std::string & end = " "
) override
```
Expand Down
5 changes: 3 additions & 2 deletions docs/api/Classes/classbarkeep_1_1_progress_bar.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Inherits from [`barkeep::AsyncDisplay`](api/Classes/classbarkeep_1_1_async_displ
| <span class="codey"> void </span>| <span class="codey"> **[render_progress_bar_](api/Classes/classbarkeep_1_1_progress_bar.md#function-render_progress_bar_)**(std::ostream * out = nullptr)</span><br>Compute the shape of the progress bar based on progress and write to output stream. |
| <span class="codey"> void </span>| <span class="codey"> **[render_counts_](api/Classes/classbarkeep_1_1_progress_bar.md#function-render_counts_)**(const std::string & end = " ")</span><br>Write progress value with the total, e.g. 50/100, to output stream. Progress width is expanded (and right justified) to match width of total. |
| <span class="codey"> void </span>| <span class="codey"> **[render_percentage_](api/Classes/classbarkeep_1_1_progress_bar.md#function-render_percentage_)**(const std::string & end = " ")</span><br>Write the percent completed to output stream. |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_progress_bar.md#function-render_)**(const std::string & end = " ") override</span><br>Run all of the individual render methods to write everything to stream. |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_progress_bar.md#function-render_)**(bool = false, const std::string & end = " ") override</span><br>Run all of the individual render methods to write everything to stream. |
| <span class="codey"> virtual [Duration](api/Namespaces/namespacebarkeep.md#using-duration) </span>| <span class="codey"> **[default_interval_](api/Classes/classbarkeep_1_1_progress_bar.md#function-default_interval_)**() const override</span> |
| <span class="codey"> virtual void </span>| <span class="codey"> **[start](api/Classes/classbarkeep_1_1_progress_bar.md#function-start)**() override</span><br>Start the display but do not show. This typically means start measuring speed if applicable, without displaying anything. |

Expand Down Expand Up @@ -104,7 +104,7 @@ Inherits from [`barkeep::AsyncDisplay`](api/Classes/classbarkeep_1_1_async_displ

| | Name |
| -------------- | -------------- |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**()</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**(bool redraw = false)</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">long </span>| <span class="codey">**[render_message_](api/Classes/classbarkeep_1_1_async_display.md#function-render_message_)**() const</span><br>Display the message to output stream. |
| <span class="codey">virtual void </span>| <span class="codey">**[join](api/Classes/classbarkeep_1_1_async_display.md#function-join)**()</span><br>Join the display thread. Protected because python bindings need to override to handle GIL. |

Expand Down Expand Up @@ -261,6 +261,7 @@ Write the percent completed to output stream.

```cpp
inline virtual long render_(
bool = false,
const std::string & end = " "
) override
```
Expand Down
19 changes: 17 additions & 2 deletions docs/api/Classes/classbarkeep_1_1_status.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Inherits from [`barkeep::Animation`](api/Classes/classbarkeep_1_1_animation.md),
| <span class="codey"> </span>| <span class="codey"> **[~Status](api/Classes/classbarkeep_1_1_status.md#function-~status)**()</span> |
| <span class="codey"> virtual std::unique_ptr< [AsyncDisplay](api/Classes/classbarkeep_1_1_async_display.md) > </span>| <span class="codey"> **[clone](api/Classes/classbarkeep_1_1_status.md#function-clone)**() const override</span> |
| <span class="codey"> void </span>| <span class="codey"> **[message](api/Classes/classbarkeep_1_1_status.md#function-message)**(const std::string & message)</span><br>Update the displayed message. This is thread-safe between the display thread and the calling thread. |
| <span class="codey"> std::string </span>| <span class="codey"> **[message](api/Classes/classbarkeep_1_1_status.md#function-message)**()</span><br>Get the current message. |


</span>
Expand All @@ -30,7 +31,7 @@ Inherits from [`barkeep::Animation`](api/Classes/classbarkeep_1_1_animation.md),

| | Name |
| -------------- | -------------- |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_status.md#function-render_)**(const std::string & end = " ") override</span><br>Render a display: animation, progress bar, etc. |
| <span class="codey"> virtual long </span>| <span class="codey"> **[render_](api/Classes/classbarkeep_1_1_status.md#function-render_)**(bool redraw = false, const std::string & end = " ") override</span><br>Render a display: animation, progress bar, etc. |


</span>
Expand Down Expand Up @@ -122,7 +123,7 @@ Inherits from [`barkeep::Animation`](api/Classes/classbarkeep_1_1_animation.md),
| | Name |
| -------------- | -------------- |
| <span class="codey">virtual [Duration](api/Namespaces/namespacebarkeep.md#using-duration) </span>| <span class="codey">**[default_interval_](api/Classes/classbarkeep_1_1_async_display.md#function-default_interval_)**() const = 0</span> |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**()</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">void </span>| <span class="codey">**[display_](api/Classes/classbarkeep_1_1_async_display.md#function-display_)**(bool redraw = false)</span><br>Display everything (message, maybe with animation, progress bar, etc). |
| <span class="codey">long </span>| <span class="codey">**[render_message_](api/Classes/classbarkeep_1_1_async_display.md#function-render_message_)**() const</span><br>Display the message to output stream. |
| <span class="codey">virtual void </span>| <span class="codey">**[start](api/Classes/classbarkeep_1_1_async_display.md#function-start)**()</span><br>Start the display but do not show. This typically means start measuring speed if applicable, without displaying anything. |
| <span class="codey">virtual void </span>| <span class="codey">**[join](api/Classes/classbarkeep_1_1_async_display.md#function-join)**()</span><br>Join the display thread. Protected because python bindings need to override to handle GIL. |
Expand Down Expand Up @@ -218,18 +219,32 @@ inline void message(

Update the displayed message. This is thread-safe between the display thread and the calling thread.

### function `message`

```cpp
inline std::string message()
```

Get the current message.

## Protected Functions Documentation

### function `render_`

```cpp
inline virtual long render_(
bool redraw = false,
const std::string & end = " "
) override
```

Render a display: animation, progress bar, etc.

**Parameters**:

* **redraw** If true, display is assumed to be redrawn. This, e.g. means an [Animation](api/Classes/classbarkeep_1_1_animation.md) should not increment the still frame index.


**Return**: Number of `\n` characters in the display.

**Reimplements**: [`barkeep::Animation::render_`](api/Classes/classbarkeep_1_1_animation.md#function-render_)
Expand Down
Loading

0 comments on commit ceb9b4a

Please sign in to comment.