PCB-FPW developer documentation based on version: 0.0.11

Data Structures | Typedefs | Functions | Variables

register_functions.h File Reference

Header file for helper functions to register package dependant functions for both fpw (CLI) and pcb-gfpw (GUI) versions of the pcb FootPrintWizard. More...

Go to the source code of this file.

Data Structures

struct  fpw_function_t
  More...
struct  fpw_function_node_t
  More...

Typedefs

typedef struct fpw_function_node_t fpw_function_node_t
 

Functions

static int fpw_function_sort (const void *va, const void *vb)
fpw_function_tfpw_find_function (const char *name)
 Find the function as described in name in the register.
int fpw_functionv (const char *name, int argc, char **argv)
 Find the trigger callback of the registered function.
int fpw_function (const char *name)
 Find the trigger callback of the registered function.
void fpw_register_functions (fpw_function_t *a, int n)
 Register all functions related to packages/footprints.

Variables

fpw_function_node_tfpw_function_nodes = 0
static int n_functions = 0
static fpw_function_tall_functions = 0

Detailed Description

Header file for helper functions to register package dependant functions for both fpw (CLI) and pcb-gfpw (GUI) versions of the pcb FootPrintWizard.

Author:
Copyright (C) 2007, 2008, 2009, 2010 by Bert Timmerman <bert.timmerman@xs4all.nl>

This mechanism is copied from the pcb plug-in/HID mechanism.
The usual copyright disclaimer applies here and my thanks go to DJ Delorie for creating this functionality in pcb.
The implementation is modified for the specific needs of pcb-gfpw/fpw.
fpw (FootPrintWizard) is a program for the creation of footprint files to be used by the pcb layout application (see http://pcb.sourgeforge.net) for the placement of parts in a pcb layout.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

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, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition in file register_functions.h.


Typedef Documentation


Function Documentation

fpw_function_t* fpw_find_function ( const char *  name  ) 

Find the function as described in name in the register.

Returns:
0 if a NULL pointer is passed.
Parameters:
name : this is the function name.

Definition at line 70 of file register_functions.c.

References fpw_function_sort(), fpw_function_node_t::functions, fpw_function_node_t::n, and fpw_function_node_t::next.

Referenced by fpw_functionv().

Here is the call graph for this function:

int fpw_function ( const char *  name  ) 

Find the trigger callback of the registered function.

I guess this is the front end part of the function.

Todo:
The registering and usage of functions still needs to be implemented in proper way.
Returns:
the trigger callback of the registered function.
Parameters:
name : this is the function name.

Definition at line 165 of file register_functions.c.

References fpw_functionv().

Here is the call graph for this function:

int fpw_functionv ( const char *  name,
int  argc,
char **  argv 
)

Find the trigger callback of the registered function.

I guess this is the worker part of the function.

Todo:
The registering and usage of functions still needs to be implemented in proper way.
Returns:
the trigger callback of the registered function.
Parameters:
name : this is the function name.
argc : number of arguments.
argv : array of argument variables.

Definition at line 125 of file register_functions.c.

References fpw_find_function(), fpw_function_t::trigger_cb, and verbose.

Referenced by fpw_function().

Here is the call graph for this function:

void fpw_register_functions ( fpw_function_t a,
int  n 
)

Register all functions related to packages/footprints.

Todo:
The registering and usage of functions still needs to be implemented in proper way.

Definition at line 182 of file register_functions.c.

References fpw_function_node_t::functions, fpw_function_node_t::n, fpw_function_node_t::next, and verbose.