Functions | |
def | _escape_string |
def | cpp_message_declarations |
def | default_value |
def | escape_message_definition |
def | escape_string |
def | generate_fixed_length_assigns |
def | generate_initializer_list |
def | is_fixed_length |
def | msg_type_to_cpp |
def | takes_allocator |
Variables | |
dictionary | MSG_TYPE_TO_CPP |
def gencpp._escape_string | ( | s | ) | [private] |
Definition at line 90 of file __init__.py.
def gencpp.cpp_message_declarations | ( | name_prefix, | |
msg | |||
) |
Returns the different possible C++ declarations for a message given the message itself. @param name_prefix: The C++ prefix to be prepended to the name, e.g. "std_msgs::" @type name_prefix: str @param msg: The message type @type msg: str @return: A tuple of 3 different names. cpp_message_decelarations("std_msgs::", "String") returns the tuple ("std_msgs::String_", "std_msgs::String_<ContainerAllocator>", "std_msgs::String") @rtype: str
Definition at line 111 of file __init__.py.
def gencpp.default_value | ( | type | ) |
Returns the value to initialize a message member with. 0 for integer types, 0.0 for floating point, false for bool, empty string for everything else @param type: The type @type type: str
Definition at line 161 of file __init__.py.
def gencpp.escape_message_definition | ( | definition | ) |
Definition at line 95 of file __init__.py.
def gencpp.escape_string | ( | str | ) |
Definition at line 191 of file __init__.py.
def gencpp.generate_fixed_length_assigns | ( | spec, | |
container_gets_allocator, | |||
cpp_name_prefix | |||
) |
Initialize any fixed-length arrays @param s: The stream to write to @type s: stream @param spec: The message spec @type spec: genmsg.msgs.MsgSpec @param container_gets_allocator: Whether or not a container type (whether it's another message, a vector, array or string) should have the allocator passed to its constructor. Assumes the allocator is named _alloc. @type container_gets_allocator: bool @param cpp_name_prefix: The C++ prefix to use when referring to the message, e.g. "std_msgs::" @type cpp_name_prefix: str
Definition at line 197 of file __init__.py.
def gencpp.generate_initializer_list | ( | spec, | |
container_gets_allocator | |||
) |
Writes the initializer list for a constructor @param s: The stream to write to @type s: stream @param spec: The message spec @type spec: genmsg.msgs.MsgSpec @param container_gets_allocator: Whether or not a container type (whether it's another message, a vector, array or string) should have the allocator passed to its constructor. Assumes the allocator is named _alloc. @type container_gets_allocator: bool
Definition at line 229 of file __init__.py.
def gencpp.is_fixed_length | ( | spec, | |
msg_context, | |||
includepath | |||
) |
Returns whether or not the message is fixed-length @param spec: The message spec @type spec: genmsg.msgs.MsgSpec @param package: The package of the @type package: str
Definition at line 130 of file __init__.py.
def gencpp.msg_type_to_cpp | ( | type | ) |
Converts a message type (e.g. uint32, std_msgs/String, etc.) into the C++ declaration for that type (e.g. uint32_t, std_msgs::String_<ContainerAllocator>) @param type: The message type @type type: str @return: The C++ declaration @rtype: str
Definition at line 58 of file __init__.py.
def gencpp.takes_allocator | ( | type | ) |
Returns whether or not a type can take an allocator in its constructor. False for all builtin types except string. True for all others. @param type: The type @type: str
Definition at line 179 of file __init__.py.
dictionary gencpp::MSG_TYPE_TO_CPP |
00001 {'byte': 'int8_t', 00002 'char': 'uint8_t', 00003 'bool': 'uint8_t', 00004 'uint8': 'uint8_t', 00005 'int8': 'int8_t', 00006 'uint16': 'uint16_t', 00007 'int16': 'int16_t', 00008 'uint32': 'uint32_t', 00009 'int32': 'int32_t', 00010 'uint64': 'uint64_t', 00011 'int64': 'int64_t', 00012 'float32': 'float', 00013 'float64': 'double', 00014 'string': 'std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > ', 00015 'time': 'ros::Time', 00016 'duration': 'ros::Duration'}
Definition at line 40 of file __init__.py.