Mathematic Expressions Library  0.1
The core math data structures and manipulators
symbolic.h File Reference
#include <stddef.h>
#include "expression_lite.h"
Include dependency graph for symbolic.h:

Go to the source code of this file.

Data Structures

struct  sym
 A named symbol type. More...
 

Macros

#define SYMBOLIC_NAME_SIZE   10
 
#define SYMBOLIC_P_STR_SIZE   16
 

Typedefs

typedef struct sym sym_t
 

Functions

sym_t sym_new_name (char *name)
 New symbolic object whose name is set to name. More...
 
sym_t string_to_sym (size_t src_str_len, char const *src_str)
 Create symbol from a string. More...
 
void sym_to_string (char *dst_str, sym_t src_sym)
 Generate a string from a sym_t. More...
 

Detailed Description

Date
May 3, 2014
Author
Craig Hesling

A light structure that is mostly public access.

The point of the sym structure is to create a string based reference to an object without being directly connected to the object. This allows for

Macro Definition Documentation

◆ SYMBOLIC_NAME_SIZE

#define SYMBOLIC_NAME_SIZE   10

◆ SYMBOLIC_P_STR_SIZE

#define SYMBOLIC_P_STR_SIZE   16

Typedef Documentation

◆ sym_t

typedef struct sym sym_t

Function Documentation

◆ string_to_sym()

sym_t string_to_sym ( size_t  src_str_len,
char const *  src_str 
)

Create symbol from a string.

Parameters
src_str_lenThe length of the actual buffer (not the number size).
src_strThe source string.
Returns
The symbol in the source string.
Note
Must have first char be digit
Currently we only do Long Ints

< Used to explore the presence of a symbol parameter

Here is the call graph for this function:

◆ sym_new_name()

sym_t sym_new_name ( char *  name)

New symbolic object whose name is set to name.

Todo:
Should probably check that the name contains valid chars (printable)

◆ sym_to_string()

void sym_to_string ( char *  dst_str,
sym_t  src_sym 
)

Generate a string from a sym_t.

Parameters
dst_strString to write to.
src_symSymbolic type to read from.
Here is the call graph for this function: