pcb 4.1.1
An interactive printed circuit board layout editor.

object.c File Reference

#include <string.h>
#include "gts.h"
#include "gts-private.h"
Include dependency graph for object.c:

Go to the source code of this file.

Functions

static void gts_object_class_init (GtsObjectClass *klass, GtsObjectClass *parent_class)
gpointer gts_object_class_new (GtsObjectClass *parent_class, GtsObjectClassInfo *info)
or NULL if it hasn't been

instantiated yet.

GtsObjectClassgts_object_class_from_name (const gchar *name)
static void object_destroy (GtsObject *object)
static void object_clone (GtsObject *clone, GtsObject *object)
static void object_class_init (GtsObjectClass *klass)
static void object_init (GtsObject *object)
GtsObjectClassgts_object_class (void)
gpointer gts_object_check_cast (gpointer object, gpointer klass)
gpointer gts_object_class_check_cast (gpointer klass, gpointer from)
void gts_object_init (GtsObject *object, GtsObjectClass *klass)
GtsObjectgts_object_new (GtsObjectClass *klass)
GtsObjectgts_object_clone (GtsObject *object)
void gts_object_destroy (GtsObject *object)
void gts_object_reset_reserved (GtsObject *object)
void gts_object_attributes (GtsObject *object, GtsObject *from)
static void free_class (gchar *name, GtsObjectClass *klass)
void gts_finalize (void)

Variables

static GHashTable * class_table = NULL

Function Documentation

static void free_class ( gchar *  name,
GtsObjectClass klass 
) [static]

Definition at line 327 of file object.c.

Referenced by gts_finalize().

void gts_finalize ( void  )

gts_finalize:

Free all the memory allocated by the object system of GTS. No other GTS function can be called after this function has been called.

Definition at line 338 of file object.c.

References class_table, and free_class().

Here is the call graph for this function:

void gts_object_attributes ( GtsObject object,
GtsObject from 
)

gts_object_attributes: : a GtsObject. : a GtsObject.

Calls the attributes() method of using as source.

Definition at line 319 of file object.c.

References _GtsObjectClass::attributes, and _GtsObject::klass.

Referenced by gts_delaunay_add_vertex_to_face(), swap_if_in_circle(), triangulate_face(), and triangulate_polygon().

gpointer gts_object_check_cast ( gpointer  object,
gpointer  klass 
)

gts_object_check_cast: : a GtsObject. : a GtsObjectClass.

Returns: while emitting warnings if is not of class .

Definition at line 154 of file object.c.

References GTS_OBJECT_CLASS, and gts_object_is_from_class().

Here is the call graph for this function:

gpointer gts_object_class_check_cast ( gpointer  klass,
gpointer  from 
)

gts_object_class_check_cast: : a GtsObjectClass. : a GtsObjectClass.

Returns: while emitting warnings if is not derived from .

Definition at line 184 of file object.c.

References GTS_OBJECT_CLASS, and gts_object_class_is_from_class().

Here is the call graph for this function:

GtsObjectClass* gts_object_class_from_name ( const gchar *  name)

Definition at line 76 of file object.c.

References class_table.

Referenced by graph_read(), and gts_graph_read().

static void gts_object_class_init ( GtsObjectClass klass,
GtsObjectClass parent_class 
) [static]
gpointer gts_object_class_new ( GtsObjectClass parent_class,
GtsObjectClassInfo info 
)

gts_object_class_new: : a GtsObjectClass. : a GtsObjectClassInfo, description of the new class to create.

Returns: a new GtsObjectClass derived from and described by .

Definition at line 44 of file object.c.

References _GtsObjectClassInfo::class_size, class_table, gts_object_class_init(), _GtsObjectClass::info, _GtsObjectClassInfo::name, _GtsObjectClassInfo::object_size, and _GtsObjectClass::parent_class.

Referenced by cface_class(), edge_inter_class(), gts_bbox_class(), gts_cluster_class(), gts_cluster_grid_class(), gts_color_vertex_class(), gts_constraint_class(), gts_containee_class(), gts_container_class(), gts_edge_class(), gts_face_class(), gts_fnode_class(), gts_gedge_class(), gts_gnode_class(), gts_gnode_split_class(), gts_graph_class(), gts_hash_container_class(), gts_hsplit_class(), gts_hsurface_class(), gts_list_face_class(), gts_nedge_class(), gts_nface_class(), gts_ngnode_class(), gts_nvertex_class(), gts_object_class(), gts_pgedge_class(), gts_pgraph_class(), gts_pnode_class(), gts_point_class(), gts_psurface_class(), gts_segment_class(), gts_slist_containee_class(), gts_slist_container_class(), gts_split_class(), gts_surface_class(), gts_surface_inter_class(), gts_triangle_class(), gts_vertex_class(), gts_vertex_normal_class(), gts_wgedge_class(), gts_wgnode_class(), gts_wgraph_class(), heap_surface_class_new(), toporouter_arc_class(), toporouter_bbox_class(), toporouter_constraint_class(), toporouter_edge_class(), and toporouter_vertex_class().

Here is the call graph for this function:

GtsObject* gts_object_clone ( GtsObject object)

gts_object_clone: : a GtsObject.

Calls the clone method of . The call to this function will fail if no clone method exists for the given object.

Returns: a new object clone of .

Definition at line 262 of file object.c.

References _GtsObjectClass::clone, _GtsObjectClass::info, _GtsObject::klass, _GtsObjectClassInfo::name, object_init(), and _GtsObjectClassInfo::object_size.

Referenced by gts_graph_partition_clone(), gts_vertex_is_contact(), and split_encroached().

Here is the call graph for this function:

void gts_object_destroy ( GtsObject object)

gts_object_destroy: : a GtsObject.

Calls the destroy method of , freeing all memory allocated for it.

Definition at line 292 of file object.c.

References _GtsObjectClass::destroy, GTS_DESTROYED, GTS_OBJECT_SET_FLAGS, and _GtsObject::klass.

Referenced by bb_tree_free(), build_cdt(), cface_expand(), cluster_destroy(), cluster_find(), delaunay_create_from_vertices(), delete_route(), delete_vertex(), destroy_cluster(), destroy_foreach_face(), edge_collapse(), edge_destroy(), foreach_face_remove(), gnode_remove_container(), gnode_split_destroy(), gts_bb_tree_point_closest(), gts_bb_tree_segment_distance(), gts_bb_tree_triangle_distance(), gts_delaunay_add_constraint(), gts_delaunay_remove_hull(), gts_edge_swap(), gts_edges_merge(), gts_graph_bfgg_bisection(), gts_graph_bisection_destroy(), gts_graph_bisection_new(), gts_graph_bubble_partition(), gts_graph_ggg_bisection(), gts_graph_partition_destroy(), gts_graph_read(), gts_hsurface_new(), gts_point_is_inside_surface(), gts_point_locate(), gts_point_triangle_closest(), gts_psurface_open(), gts_psurface_read_vertex(), gts_split_collapse(), gts_surface_inter_new(), gts_surface_intersection(), gts_surface_is_self_intersecting(), gts_surface_read(), gts_surface_remove_face(), gts_vertices_merge(), gts_volume_optimized_cost(), hsurface_destroy(), merge_duplicate(), midvertex_insertion(), oproute_free(), pgraph_destroy(), psurface_destroy(), recursive_bisection(), remove_intersected_edge(), replace_edge_collapse(), segment_destroy(), self_intersecting(), split_destroy(), split_encroached(), surface_inter_destroy(), surface_read(), temp_point_clean(), tessellate_face(), toporouter_bbox_locate(), triangle_destroy(), triangulate_face(), unconstrain(), and vertex_destroy().

void gts_object_init ( GtsObject object,
GtsObjectClass klass 
)

gts_object_init: : a GtsObject. : a GtsObjectClass.

Calls the init method of with as argument. This is done recursively in the correct order (from the base class to the top). You should rarely need this function as it is called automatically by the constructor for each class.

Definition at line 211 of file object.c.

References gts_object_init(), _GtsObjectClass::info, _GtsObjectClassInfo::object_init_func, and _GtsObjectClass::parent_class.

Referenced by cface_expand(), cface_new(), container_clone(), gts_object_init(), and gts_object_new().

Here is the call graph for this function:

static void object_class_init ( GtsObjectClass klass) [static]
static void object_clone ( GtsObject clone,
GtsObject object 
) [static]
static void object_destroy ( GtsObject object) [static]

Definition at line 85 of file object.c.

References _GtsObjectClass::info, _GtsObject::klass, and _GtsObjectClassInfo::name.

Referenced by object_class_init().

static void object_init ( GtsObject object) [static]

Definition at line 116 of file object.c.

Referenced by gts_object_class(), and gts_object_clone().


Variable Documentation

GHashTable* class_table = NULL [static]

Definition at line 24 of file object.c.

Referenced by gts_finalize(), gts_object_class_from_name(), and gts_object_class_new().