MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EpFunc.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EpFunc0< T >
 
class  EpFunc1< T, A >
 
class  EpFunc2< T, A1, A2 >
 
class  EpFunc3< T, A1, A2, A3 >
 
class  EpFunc4< T, A1, A2, A3, A4 >
 
class  EpFunc5< T, A1, A2, A3, A4, A5 >
 
class  EpFunc6< T, A1, A2, A3, A4, A5, A6 >
 
class  GetEpFunc< T, A >
 
class  GetEpFunc1< T, L, A >
 

Functions

template<class T >
T * getEpFuncData (const Eref &e)
 
template<>
NeutralgetEpFuncData< Neutral > (const Eref &e)
 

Function Documentation

template<class T >
T* getEpFuncData ( const Eref e)

Utility function to return a pointer of the desired type from the Eref data. Mainly here because it lets us specialize for Neutrals, below.

Definition at line 18 of file EpFunc.h.

References Eref::data().

19 {
20  return reinterpret_cast< T* >( e.data() ) ;
21 }
char * data() const
Definition: Eref.cpp:41

+ Here is the call graph for this function:

template<>
Neutral* getEpFuncData< Neutral > ( const Eref e)

This is a template specialization for GetEpFunc applied to Neutrals. This is necessary in order to access Element fields of objects that may not have been allocated (such as synapses), even though their Element has been created and needs to be manipulated. Apparently regular functions with same args will be preferred over templates, let's see if this works. Nope, it doesn't. Good try. extern Neutral* getEpFuncData( const Eref& e ); Try this form: it doesn't work either. extern Neutral* dummyNeutral(); template<> Neutral* getEpFuncData< Neutral >( const Eref& e ) { return dummyNeutral(); } Try externing the template itself.

Definition at line 13 of file EpFunc.cpp.

References dummy.

14 {
15  static Neutral dummy;
16  return &dummy;
17 }
static DestFinfo dummy("dummy","This Finfo is a dummy. If you are reading this you have used an invalid index", 0)