diff options
author | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-12-27 19:14:29 +0000 |
---|---|---|
committer | allen <allen@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2001-12-27 19:14:29 +0000 |
commit | 81bd5b0d66c168d7d8317e7b0d67079819f07480 (patch) | |
tree | 897b71adae897284f83f2188bb17827d39429a0d /src | |
parent | 2c9acfabed91514d28d3ff0d308db1e4444cbb83 (diff) |
New function to return IO method name from handle
const char *CCTK_IOMethod (int handle)
git-svn-id: http://svn.cactuscode.org/flesh/trunk@2533 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src')
-rw-r--r-- | src/IO/IOMethods.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/IO/IOMethods.c b/src/IO/IOMethods.c index cd245cf0..02282f3f 100644 --- a/src/IO/IOMethods.c +++ b/src/IO/IOMethods.c @@ -118,6 +118,7 @@ int CCTKi_RegisterIOMethod (const char *thorn, const char *name) /* Initialise the I/O method structure with dummy routines */ new_method->implementation = CCTK_ThornImplementation (thorn); + new_method->name = name; new_method->OutputGH = DummyOutputGH; new_method->OutputVarAs = DummyOutputVarAs; new_method->TriggerOutput = DummyTriggerOutput; @@ -520,6 +521,34 @@ const char *CCTK_IOMethodImplementation (int handle) } + /*@@ + @routine CCTK_IOMethod + @date Thu Dec 27 2001 + @author Gabrielle Allen + @desc + Provide the IO Method name + @enddesc + @var handle + @vdesc handle of I/O method + @vtype int + @vio in + @endvar + + @returntype const char * + @returndesc + IO Method + @endreturndesc +@@*/ +const char *CCTK_IOMethod (int handle) +{ + struct IOMethod *method; + + method = (struct IOMethod *) Util_GetHandledData (IOMethods, handle); + + return (method ? method->name : NULL); +} + + /******************************************************************** ********************* Local Routines ************************* ********************************************************************/ |