RIT VEXU Core API
|
#include <types.hpp>
Public Member Functions | |
String (std::string name, FetchFunc fetcher=[]() { return "no value";}) | |
void | fetch () override |
void | response () override |
void | set_value (std::string new_value) |
std::string | get_value () |
void | read_data_from_message (PacketReader &reader) override |
void | pprint (std::stringstream &ss, size_t indent) const override |
void | pprint_data (std::stringstream &ss, size_t indent) const override |
![]() | |
Part (std::string name) | |
std::string | pretty_print () const |
std::string | pretty_print_data () const |
Protected Member Functions | |
void | write_schema (PacketWriter &sofar) const override |
void | write_message (PacketWriter &sofar) const override |
A string type conveyed as a part
|
explicit |
creates a string type conveyed as a part with a name and a fetcher
name | name of the string to have |
fetcher | the fetch function to use when running fetch() |
creates a string type conveyed as a part with a name and a fetcher
name | name of the string to have |
fetcher | the fetcher function to use when assigning it new data |
|
overridevirtual |
function to run when fetching this part, runs the fetch function
used to assign the string new data, runs the fetch function
Implements VDP::Part.
std::string VDP::String::get_value | ( | ) |
|
overridevirtual |
changes a stringstream to be formatted as name: string
ss | the stringstream to change |
indent | the amount of indents to use |
Implements VDP::Part.
|
overridevirtual |
changes a stringstream to be formatted as name: value
ss | the stringstream to change |
indent | the amount of indents to use |
Implements VDP::Part.
|
overridevirtual |
sets the string part's value to the string read by a packet reader
reader | the packet reader to get the string from |
sets the string part's value to the string read by a packet reader
reader | the part reader to get |
Implements VDP::Part.
|
overridevirtual |
function to run when receiving to this part
Reimplemented from VDP::Part.
void VDP::String::set_value | ( | std::string | new_value | ) |
sets the string part's value to the string given
new_value | the string to set the value to |
|
overrideprotectedvirtual |
writes the strings data to a packet
sofar | the packet writer to write with |
Implements VDP::Part.
|
overrideprotectedvirtual |
writes the schematic for the string to a packet
sofar | the packet writer to write with |
Implements VDP::Part.