gattrib

s_sheet_data.c File Reference

Functions involved in manipulating an entire SHEET_DATA structure. More...

#include <config.h>
#include <stdio.h>
#include <math.h>
#include <libgeda/libgeda.h>
#include "../include/struct.h"
#include "../include/prototype.h"
#include "../include/globals.h"
Include dependency graph for s_sheet_data.c:

Go to the source code of this file.

Functions

SHEET_DATAs_sheet_data_new ()
 Create a SHEET_DATA struct.
void s_sheet_data_add_master_comp_list_items (const GList *obj_list)
 Add components to master list.
void s_sheet_data_add_master_comp_attrib_list_items (const GList *obj_list)
 Add attributes to master list.
void s_sheet_data_add_master_net_list_items (const GList *obj_start)
 Add net names to master list.
void s_sheet_data_add_master_net_attrib_list_items (const GList *obj_start)
 Add net attributes to master list.
void s_sheet_data_add_master_pin_list_items (const GList *obj_list)
 Add pin names to master list.
void s_sheet_data_add_master_pin_attrib_list_items (const GList *obj_list)
 Add pin attributes to master list.
void s_sheet_data_gtksheet_to_sheetdata ()
 Extract data from gtksheet.

Detailed Description

This file holds functions involved in manipulating an entire SHEET_DATA structure. The SHEET_DATA structure is the intermediate structure between TOPLEVEL (gEDA's native format) and the graphical gtksheet widget (from gtkextra), which is the spreadsheet widget displaying the attribs.

Definition in file s_sheet_data.c.


Function Documentation

SHEET_DATA* s_sheet_data_new ( )

Creates an initialised but empty SHEET_DATA struct.

Returns:
a pointer to a SHEET_DATA struct.

Definition at line 62 of file s_sheet_data.c.

Here is the call graph for this function:

void s_sheet_data_add_master_comp_list_items ( const GList *  obj_list)

Add to the master list of components refdeses by running through the components and recording the comp refdeses it discovers. Then it sorts them into alphabetical order. Data struct being searched is: OBJECT->attribs(->next. . .)->object->text->string

Parameters:
obj_listpointer to the component list to be added.

Definition at line 110 of file s_sheet_data.c.

Here is the call graph for this function:

void s_sheet_data_add_master_comp_attrib_list_items ( const GList *  obj_list)

Add to the master list of comp attributes by running through each component on the page and recording all attribs it discovers. Then it sorts them into an order used for the horiz listing of the attribs on the spreadsheet. Data struct being searched is: sheet_head->component_list_head->attrib->name;

Parameters:
obj_listpointer to list of attributes being added

Definition at line 173 of file s_sheet_data.c.

Here is the call graph for this function:

void s_sheet_data_add_master_net_list_items ( const GList *  obj_start)

Build the master list of net names by running through the individual cells and recording the net refdeses it discovers. It's currently empty, waiting for implementation of net attributes.

Definition at line 250 of file s_sheet_data.c.

void s_sheet_data_add_master_net_attrib_list_items ( const GList *  obj_start)

Build the master list of net attribs. It's currently empty, waiting for implementation of net attributes.

Definition at line 262 of file s_sheet_data.c.

void s_sheet_data_add_master_pin_list_items ( const GList *  obj_list)

Build the master list of pin names. It writes the label refdes:pinnumber into the global master pin list. Algorithm:

  1. Loop on o_current looking for OBJ_COMPLEX
  2. When we find a complex, save the refdes.
  3. Dive down to o_lower_current = o_current->complex->prim_objs
  4. Loop on o_lower_current looking for OBJ_PIN
  5. When we find a pin, find the pinnumber by calling o_attrib_search_object_attribs_by_name(o_lower_current, "pinnumber", 0)
  6. Create the pin list label as "refdes=XXX", and stick it into the master pin list. Since this function operates on the global sheet_data->master_pin_list, it doesn't return a value.
    Parameters:
    obj_listpointer to list of pin names to be added.

Definition at line 286 of file s_sheet_data.c.

Here is the call graph for this function:

void s_sheet_data_add_master_pin_attrib_list_items ( const GList *  obj_list)

Build the master list of pin attributes. It writes each attrib name into the master pin attrib list. Algorithm:

  1. Loop on o_current looking for OBJ_COMPLEX
  2. When we find a complex, save the refdes.
  3. Dive down to o_lower_current = o_current->complex->prim_objs
  4. Loop on o_lower_current looking for OBJ_PIN
  5. When we find a pin, get pin_attribs = o_lower_current->attribs
  6. Loop on attribs looking for non-NULL text.
  7. When we find a non-NULL text attrib, extract the attrib name and stick it in the master pin attrib list.
    Parameters:
    obj_listpointer to list of pin attributes to be added.

Definition at line 376 of file s_sheet_data.c.

Here is the call graph for this function:

void s_sheet_data_gtksheet_to_sheetdata ( )

This fcn extracts the attribs from the gtksheet widget cells, and places them back into SHEET_DATA. This is the first step in saving out a project. Right now I just invoke s_table_gtksheet_to_table. Do I need to do anything else here?

Definition at line 468 of file s_sheet_data.c.

Here is the call graph for this function:

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines