File notation_plpath.h
FileList > note-plpath > src > notation_plpath.h
Go to the source code of this file
Notation module for PL paths. More...
#include <stdbool.h>#include <stdint.h>#include <stdlib.h>
Classes
| Type | Name |
|---|---|
| struct | note_plpath_point_buffer_t Type defining the data of a buffer of plpath nodes. |
| struct | note_plpath_point_t Type defining the data of a plpath node. |
| struct | note_plpath_t Type defining the notation for a plpath. |
Public Types
| Type | Name |
|---|---|
| typedef struct note_plpath_point_buffer_t | note_plpath_point_buffer_t Type defining the data of a buffer of plpath nodes. |
| typedef struct note_plpath_point_t | note_plpath_point_t Type defining the data of a plpath node. |
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. |
| 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. |
Macros
| Type | Name |
|---|---|
| define | NOTE_PLPATH_DECODE_BAD_STR (0x01u << 0x03u)Decode plpath error flag indicating a malformed string. |
| define | NOTE_PLPATH_DECODE_BUFFER_ERROR (0x01u << 0x04u)Decode plpath error flag indicating a node buffer error. |
| define | NOTE_PLPATH_DECODE_EMPTY_STR (0x01u << 0x01u)Decode plpath error flag indicating an empty string. |
| define | NOTE_PLPATH_DECODE_MAX_CHILDREN ([**UTIL\_TANG\_DEFS\_MAX\_CROSSINGNUM**](tang__defs_8h.md#define-util_tang_defs_max_crossingnum))The maximum number of children in a node. |
| define | NOTE_PLPATH_DECODE_MAX_SEGMENTS ([**UTIL\_TANG\_DEFS\_MAX\_CROSSINGNUM**](tang__defs_8h.md#define-util_tang_defs_max_crossingnum) + 1)The maximum number of weights in a node. |
| define | NOTE_PLPATH_DECODE_NULL_DEST (0x01u << 0x02u)Decode plpath error flag indicating a null destination. |
| define | NOTE_PLPATH_DECODE_OVRUNDR_ERROR (0x01u << 0x05u)Decode plpath error flag indicating an over/under flow error. |
| define | NOTE_PLPATH_ENCODE_MALFORMED (0x01u << 0x02u)Encode plpath error flag indicating a malformed path tree. |
| define | NOTE_PLPATH_ENCODE_OVRUNDR_ERROR (0x01u << 0x03u)Encode plpath error flag indicating an over/under flow error. |
| define | NOTE_PLPATH_ENCODE_STR_BUF (0x01u << 0x01u)Encode plpath error flag indicating an error with the string buffer. |
| define | NOTE_PLPATH_MAX_STR_LEN (([**UTIL\_TANG\_DEFS\_MAX\_CROSSINGNUM**](tang__defs_8h.md#define-util_tang_defs_max_crossingnum) + 1) \* 5u)The maximum number of children in a node. |
Detailed Description
Author:
Joe Starr
Public Types Documentation
typedef note_plpath_point_buffer_t
Type defining the data of a buffer of plpath nodes.
typedef struct note_plpath_point_buffer_t note_plpath_point_buffer_t;
typedef note_plpath_point_t
Type defining the data of a plpath node.
typedef struct note_plpath_point_t note_plpath_point_t;
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_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.
Macro Definition Documentation
define NOTE_PLPATH_DECODE_BAD_STR
Decode plpath error flag indicating a malformed string.
#define NOTE_PLPATH_DECODE_BAD_STR `(0x01u << 0x03u)`
define NOTE_PLPATH_DECODE_BUFFER_ERROR
Decode plpath error flag indicating a node buffer error.
#define NOTE_PLPATH_DECODE_BUFFER_ERROR `(0x01u << 0x04u)`
define NOTE_PLPATH_DECODE_EMPTY_STR
Decode plpath error flag indicating an empty string.
#define NOTE_PLPATH_DECODE_EMPTY_STR `(0x01u << 0x01u)`
define NOTE_PLPATH_DECODE_MAX_CHILDREN
The maximum number of children in a node.
#define NOTE_PLPATH_DECODE_MAX_CHILDREN `( UTIL_TANG_DEFS_MAX_CROSSINGNUM )`
define NOTE_PLPATH_DECODE_MAX_SEGMENTS
The maximum number of weights in a node.
#define NOTE_PLPATH_DECODE_MAX_SEGMENTS `( UTIL_TANG_DEFS_MAX_CROSSINGNUM + 1)`
define NOTE_PLPATH_DECODE_NULL_DEST
Decode plpath error flag indicating a null destination.
#define NOTE_PLPATH_DECODE_NULL_DEST `(0x01u << 0x02u)`
define NOTE_PLPATH_DECODE_OVRUNDR_ERROR
Decode plpath error flag indicating an over/under flow error.
#define NOTE_PLPATH_DECODE_OVRUNDR_ERROR `(0x01u << 0x05u)`
define NOTE_PLPATH_ENCODE_MALFORMED
Encode plpath error flag indicating a malformed path tree.
#define NOTE_PLPATH_ENCODE_MALFORMED `(0x01u << 0x02u)`
define NOTE_PLPATH_ENCODE_OVRUNDR_ERROR
Encode plpath error flag indicating an over/under flow error.
#define NOTE_PLPATH_ENCODE_OVRUNDR_ERROR `(0x01u << 0x03u)`
define NOTE_PLPATH_ENCODE_STR_BUF
Encode plpath error flag indicating an error with the string buffer.
#define NOTE_PLPATH_ENCODE_STR_BUF `(0x01u << 0x01u)`
define NOTE_PLPATH_MAX_STR_LEN
The maximum number of children in a node.
#define NOTE_PLPATH_MAX_STR_LEN `(( UTIL_TANG_DEFS_MAX_CROSSINGNUM + 1) * 5u)`
The documentation for this class was generated from the following file source/note-plpath/src/notation_plpath.h