#include <config.h>
#include <stdio.h>
#include "libgeda_priv.h"
Go to the source code of this file.
Functions |
PAGE * | s_hierarchy_down_schematic_single (TOPLEVEL *toplevel, const gchar *filename, PAGE *parent, int page_control, int flag) |
| Search for schematic associated source files and load them.
|
void | s_hierarchy_down_symbol (TOPLEVEL *toplevel, const CLibSymbol *symbol, PAGE *parent) |
PAGE * | s_hierarchy_find_up_page (GedaPageList *page_list, PAGE *current_page) |
| Search for the parent page of a page in hierarchy.
|
GList * | s_hierarchy_traversepages (TOPLEVEL *toplevel, PAGE *p_current, gint flags) |
| Find page hierarchy below a page.
|
gint | s_hierarchy_print_page (PAGE *p_current, void *data) |
PAGE * | s_hierarchy_find_prev_page (GedaPageList *page_list, PAGE *current_page) |
| Search for a page preceding a given page in hierarchy.
|
PAGE * | s_hierarchy_find_next_page (GedaPageList *page_list, PAGE *current_page) |
| Search for a page following a given page in hierarchy.
|
Variables |
static int | page_control_counter = 0 |
Function Documentation
PAGE* s_hierarchy_down_schematic_single |
( |
TOPLEVEL * |
toplevel, |
|
|
const gchar * |
filename, |
|
|
PAGE * |
parent, |
|
|
int |
page_control, |
|
|
int |
flag |
|
) |
| |
- Todo:
- Finish function documentation!!!
- Function Description
- This function searches the associated source file refered by the filename and loads it. If the flag is set to HIERARCHY_NORMAL_LOAD and the page is allready in the list of pages it will return the pid of that page. If the flag is set to HIERARCHY_FORCE_LOAD then this function will load the page again with a new page id. The second case is mainly used by gnetlist where pushed down schematics MUST be unique.
- Parameters:
-
[in] | toplevel | The TOPLEVEL object. |
[in] | filename | Schematic file name. |
[in] | parent | The parent page of the schematic. |
[in] | page_control | |
[in] | flag | |
- Returns:
- The page loaded, or NULL if failed.
- Note:
- This function goes and finds the associated source files and loads all up It only works for schematic files though this is basically push flag can either be HIERARCHY_NORMAL_LOAD or HIERARCHY_FORCE_LOAD flag is mainly used by gnetlist where pushed down schematics MUST be unique
Definition at line 63 of file s_hierarchy.c.
- Function Description
- This function searches the parent page of page page in the hierarchy. It checks all the pages in the list page_list.
It returns a pointer on the page if found, NULL otherwise.
- Note:
- The page current_page must be in the list page_list.
- Parameters:
-
[in] | page_list | The list of pages in which to search. |
[in] | current_page | The reference page for the search. |
- Returns:
- A pointer on the page found or NULL if not found.
Definition at line 191 of file s_hierarchy.c.
GList* s_hierarchy_traversepages |
( |
TOPLEVEL * |
toplevel, |
|
|
PAGE * |
p_current, |
|
|
gint |
flags |
|
) |
| |
- Function Description
- This function traverses the hierarchy tree of pages and returns a flat list of pages that are below p_current. There are two flags that can be used to control the way that the return value is constructed: HIERARCHY_NODUPS returns a list without duplicate pages, and HIERARCHY_POSTORDER traverses the hierarchy tree and returns a postorder list instead of preorder.
- Parameters:
-
toplevel | The TOPLEVEL structure. |
p_current | The PAGE to traverse hierarchy for. |
flags | Flags controlling form of return value. |
- Returns:
- A GList of PAGE pointers.
- Warning:
- Caller must destroy returned GList with g_list_free().
Definition at line 219 of file s_hierarchy.c.
gint s_hierarchy_print_page |
( |
PAGE * |
p_current, |
|
|
void * |
data |
|
) |
| |
- Todo:
- Finish function documentation!!!
- Function Description
- Note:
- Test function which only prints the name of a page and it's number.
Definition at line 304 of file s_hierarchy.c.
- Function Description
- This function searches the previous sibling of page page in the hierarchy. It checks all the pages preceding page in the list page_list.
It returns a pointer on the page if found, NULL otherwise.
- Note:
- The page current_page must be in the list page_list.
- Parameters:
-
[in] | page_list | The list of pages in which to search. |
[in] | current_page | The reference page for the search. |
- Returns:
- A pointer on the page found or NULL if not found.
Definition at line 327 of file s_hierarchy.c.
- Function Description
- This function searches the next sibling of page page in the hierarchy. It checks all the pages following page in the list page_list.
It returns a pointer on the page if found, NULL otherwise.
- Note:
- The page current_page must be in the list page_list.
- Parameters:
-
[in] | page_list | The list of pages in which to search. |
[in] | current_page | The reference page for the search. |
- Returns:
- A pointer on the page found or NULL if not found.
Definition at line 361 of file s_hierarchy.c.
Variable Documentation