/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ** ** Copyright (C), 2003, ** Steve Quenette, 110 Victoria Street, Melbourne, Victoria, 3053, Australia. ** Californian Institute of Technology, 1200 East California Boulevard, Pasadena, California, 91125, USA. ** University of Texas, 1 University Station, Austin, Texas, 78712, USA. ** ** Authors: ** Stevan M. Quenette, Senior Software Engineer, VPAC. (steve@vpac.org) ** Stevan M. Quenette, Visitor in Geophysics, Caltech. ** Luc Lavier, Research Scientist, The University of Texas. (luc@utig.ug.utexas.edu) ** Luc Lavier, Research Scientist, Caltech. ** ** 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, 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ** ** $Id: Register.c 1848 2004-08-11 07:10:08Z PatrickSunter $ ** **~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ #include #include #include #include #include #include #include #include "Snac/Snac.h" #include "InitialConditions.h" #include "Register.h" #include "Snac/Plastic/Plastic.h" /* Textual name of this class */ const Type SnacPlSeeds_Type = "SnacPlSeeds"; Index _SnacPlSeeds_Register( PluginsManager* pluginsMgr ) { return PluginsManager_Submit( pluginsMgr, SnacPlSeeds_Type, "0", _SnacPlSeeds_DefaultNew ); } void* _SnacPlSeeds_DefaultNew( Name name ) { return _Codelet_New( sizeof(Codelet), SnacPlSeeds_Type, _Codelet_Delete, _Codelet_Print, _Codelet_Copy, _SnacPlSeeds_DefaultNew, _SnacPlSeeds_Construct, _Codelet_Build, _Codelet_Initialise, _Codelet_Execute, _Codelet_Destroy, name ); } void _SnacPlSeeds_Construct( void* component, Stg_ComponentFactory* cf, void* data ) { Snac_Context* context; /* Retrieve context. */ context = (Snac_Context*)Stg_ComponentFactory_ConstructByName( cf, "context", Snac_Context, True, data ); Journal_Printf( context->debug, "In: %s\n", __func__ ); /* Add extensions to nodes, elements and the context */ EntryPoint_InsertAfter( Context_GetEntryPoint( context, AbstractContext_EP_Initialise ), SnacPlastic_Type, SnacPlSeeds_Type, _SnacPlSeeds_InitialConditions, SnacPlSeeds_Type ); }