File notation_plpath.c
FileList > note-plpath > src > notation_plpath.c
Go to the source code of this file
Notation module for PL paths. More...
#include "notation_plpath.h"#include "notation_defs.h"#include "tang_defs.h"#include <stdio.h>#include <float.h>#include <string.h>#include <errno.h>#include <stdlib.h>#include <stdbool.h>
Public Functions
| Type | Name |
|---|---|
| uint8_t | note_plpath_decode (char * str, note_plpath_t * path) Function to take a note_plpath_t and decode it as a string. |
| STATIC_INLINE char * | note_plpath_dp_build_pt (char * str, note_plpath_point_t * point, const char * str_end) Build a pointer object from start of the string. |
| STATIC_INLINE char * | note_plpath_dp_move_nl (char * str, const char * str_end) Strip new lines from the front of the input string. |
| STATIC_INLINE_UINT8 | note_plpath_dp_process_str (char * str, note_plpath_t * path) Process and input string into a new point. |
| STATIC_INLINE char * | note_plpath_dp_strip_com (char * str, const char * str_end) Strip a comment line from the input string. |
| STATIC_INLINE char * | note_plpath_dp_strip_lws (char * str, const char * str_end) Strip white space chars from the front of the input string. |
| uint8_t | note_plpath_encode (note_plpath_t path, char * str, size_t buffer_size) Function to take a string and decode it as a note_plpath_t . NOTE: This function modifies the input PATH. The input is normalized so all nodes have "forward" order. This does not change the topology. |
| STATIC_INLINE char * | note_plpath_ep_insert_double (double new_double, char * str, const char * str_end) Insert the base 10 string representation of a double into the output string. |
| STATIC_INLINE char * | note_plpath_ep_writeseg (note_plpath_point_t * active_point, char * str, const char * str_end) Convert a segment (connected component) of the PL path into a string. |
Detailed Description
Author:
Joe Starr
Public Functions Documentation
function note_plpath_decode
Function to take a note_plpath_t and decode it as a string.
uint8_t note_plpath_decode (
char * str,
note_plpath_t * path
)
Parameters:
attthe note_plpath_t pointer to decode.strOutput string for decoded note_plpath_t
Returns:
uint8_t The return code for the decoding operation.
function note_plpath_dp_build_pt
Build a pointer object from start of the string.
STATIC_INLINE char * note_plpath_dp_build_pt (
char * str,
note_plpath_point_t * point,
const char * str_end
)
Parameters:
strThe start of the input string.pointA pointer to the new pointer object.str_endThe end of the input string.
Returns:
A pointer to the next char in the string after parsing the point. Alternatively a null pointer if something has gone wrong.
function note_plpath_dp_move_nl
Strip new lines from the front of the input string.
STATIC_INLINE char * note_plpath_dp_move_nl (
char * str,
const char * str_end
)
Parameters:
strA pointer to the current location in the input string.str_endThe end of the input string.
Returns:
A pointer to the next char in the string after parsing the point. Alternatively a null pointer if something has gone wrong.
function note_plpath_dp_process_str
Process and input string into a new point.
STATIC_INLINE_UINT8 note_plpath_dp_process_str (
char * str,
note_plpath_t * path
)
Parameters:
strThe input string to process.pathThe location to store the path.
Returns:
A status flag indicating the success or failure of the operation.
function note_plpath_dp_strip_com
Strip a comment line from the input string.
STATIC_INLINE char * note_plpath_dp_strip_com (
char * str,
const char * str_end
)
Parameters:
strA pointer to the current location in the input string.str_endThe end of the input string.
Returns:
A pointer to the next char in the string after parsing the point. Alternatively a null pointer if something has gone wrong.
function note_plpath_dp_strip_lws
Strip white space chars from the front of the input string.
STATIC_INLINE char * note_plpath_dp_strip_lws (
char * str,
const char * str_end
)
Parameters:
strA pointer to the current location in the input string.str_endThe end of the input string.
Returns:
A pointer to the next char in the string after parsing the point. Alternatively a null pointer if something has gone wrong.
function note_plpath_encode
Function to take a string and decode it as a note_plpath_t . NOTE: This function modifies the input PATH. The input is normalized so all nodes have "forward" order. This does not change the topology.
uint8_t note_plpath_encode (
note_plpath_t path,
char * str,
size_t buffer_size
)
Parameters:
strInput string to encode as note_plpath_tattthe note_plpath_t pointer to store the encoded string into.
Returns:
uint8_t The return code for the encoding operation.
function note_plpath_ep_insert_double
Insert the base 10 string representation of a double into the output string.
STATIC_INLINE char * note_plpath_ep_insert_double (
double new_double,
char * str,
const char * str_end
)
Parameters:
new_intA double to insert.strA pointer of current index of the output string.buffer_endA pointer to the end of the output string buffer.
Returns:
A pointer to the next char in the string after parsing the point. Alternatively a null pointer if something has gone wrong.
function note_plpath_ep_writeseg
Convert a segment (connected component) of the PL path into a string.
STATIC_INLINE char * note_plpath_ep_writeseg (
note_plpath_point_t * active_point,
char * str,
const char * str_end
)
Parameters:
active_pointThe start of the segment.strA pointer to the current location in the output string.str_endA pointer to the end of the output string.
Returns:
A pointer to the next char in the string after parsing the point. Alternatively a null pointer if something has gone wrong.
The documentation for this class was generated from the following file source/note-plpath/src/notation_plpath.c