#include <Functor.h>
Inheritance diagram for O_SESSAME::Functor:
 [legend]List of all members.
[legend]List of all members.
Detailed Description
Abstract class to hold the pointer to an force calculating functor. 
A Function Object, or Functor (the two terms are synonymous) is simply any object that can be called as if it is a function. It is used to define a call-back function that evaluates any algorithm that takes the defined inputs and returns a vector of values. Examples of usage include evaluating a disturbance force or torque given the current time, orbit state, and attitude state. The returned vector will then be the 3 forces (or torques).
- Examples:
- The simplest functor is a placeholder that can be set to just return a vector of zeros: Vector NullFunctor(const ssfTime& _pSSFTime, const OrbitState& _pOrbitState, const AttitudeState& _pAttitudeState)
{
    return Vector(3);
}
- See also:
- Integrator that requests a Functor call-back function. The Functor object is created as follows: SpecificFunctor AttitudeForcesFunctor(&NullFunctor);
 
- An ObjectFunctor may be assigned from an Environment object (pEarthEnv) where the function is GetForces: To review, we are creating an ObjectFunctor that will hold a call-back function to the Environment class (hence the template argument <environment>). The function, OrbitForcesFunctor, needs a pointer to the instance of the class we are using (pEarthEnv), and the reference to the function (&Environment::GetForces). The & is required to specify that it is a reference, and the Environment:: defines the scope of the function GetForces. It is also important to note that the GetForces function conforms to the ObjectFunctor interface. (
- See also:
- Environment::GetForces).
- Todo:
- make Functors for variety of function types 
Definition at line 63 of file Functor.h.
Member Function Documentation
The documentation for this class was generated from the following file:
Generated on Wed Sep 5 12:54:49 2007 for DSACSS Operational Code by 
 1.3.9.1
 1.3.9.1