Go to the source code of this file.
Data Structures | |
struct | ExpandoFormat |
Formatting information for an Expando. More... | |
struct | ExpandoNode |
Basic Expando Node. More... | |
Enumerations | |
enum | ExpandoNodeType { ENT_EMPTY = 0 , ENT_TEXT , ENT_EXPANDO , ENT_PADDING , ENT_CONDITION , ENT_CONDBOOL , ENT_CONDDATE , ENT_CONTAINER } |
Type of Expando Node. More... | |
Functions | |
ARRAY_HEAD (ExpandoNodeArray, struct ExpandoNode *) | |
struct ExpandoNode * | node_new (void) |
Create a new empty ExpandoNode. | |
void | node_free (struct ExpandoNode **ptr) |
Free an ExpandoNode and its private data. | |
void | node_tree_free (struct ExpandoNode **ptr) |
Free a tree of ExpandoNodes. | |
void | node_append (struct ExpandoNode **root, struct ExpandoNode *new_node) |
Append an ExpandoNode to an existing node. | |
struct ExpandoNode * | node_get_child (const struct ExpandoNode *node, int index) |
Get a child of an ExpandoNode. | |
struct ExpandoNode * | node_last (struct ExpandoNode *node) |
Find the last Node in a tree. | |
Basic Expando Node.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file node.h.
enum ExpandoNodeType |
Type of Expando Node.
Enumerator | |
---|---|
ENT_EMPTY | Empty. |
ENT_TEXT | Plain text. |
ENT_EXPANDO | Expando, e.g. 'n'. |
ENT_PADDING | Padding: soft, hard, EOL. |
ENT_CONDITION | True/False condition. |
ENT_CONDBOOL | True/False boolean condition. |
ENT_CONDDATE | True/False date condition. |
ENT_CONTAINER | Container for other nodes. |
Definition at line 35 of file node.h.
ARRAY_HEAD | ( | ExpandoNodeArray | , |
struct ExpandoNode * | |||
) |
struct ExpandoNode * node_new | ( | void | ) |
Create a new empty ExpandoNode.
ptr | New ExpandoNode |
Definition at line 39 of file node.c.
void node_free | ( | struct ExpandoNode ** | ptr | ) |
Free an ExpandoNode and its private data.
ptr | Node to free |
Definition at line 48 of file node.c.
void node_tree_free | ( | struct ExpandoNode ** | ptr | ) |
Free a tree of ExpandoNodes.
ptr | Root of tree to free |
Definition at line 76 of file node.c.
void node_append | ( | struct ExpandoNode ** | root, |
struct ExpandoNode * | new_node | ||
) |
Append an ExpandoNode to an existing node.
[in,out] | root | Existing node (may be NULL) |
[in] | new_node | Node to add |
Definition at line 116 of file node.c.
struct ExpandoNode * node_get_child | ( | const struct ExpandoNode * | node, |
int | index | ||
) |
Get a child of an ExpandoNode.
node | Parent node |
index | Index of child to get |
ptr | Child node |
NULL | No child, or index out of range |
Definition at line 99 of file node.c.
struct ExpandoNode * node_last | ( | struct ExpandoNode * | node | ) |
Find the last Node in a tree.
node | Root Node |
ptr | Last Node |
Definition at line 138 of file node.c.