WSF
wsf::space::RelativeTimeCondition Class Reference

A condition that obtains after a given time has elapsed. More...

#include <WsfSpaceOrbitalPropagatorCondition.hpp>

Inheritance diagram for wsf::space::RelativeTimeCondition:
Collaboration diagram for wsf::space::RelativeTimeCondition:

Public Member Functions

 RelativeTimeCondition ()
RelativeTimeConditionClone () const override
bool ProcessInput (UtInput &aInput) override
UtTimeValue GetOffsetTime () const
void SetOffsetTime (const UtTimeValue &aOffsetTime)
bool ValidateParameterRanges () const override
bool GetTimeToCondition (const UtOrbitalPropagatorBase &aPropagator, double &aTimeToCondition) const override
void Accept (OrbitalPropagatorConditionVisitor &aVisitor) override
 Accept a visitor.
std::string GetConditionString () const override
 Return the string identifying the condition.
Public Member Functions inherited from wsf::space::OrbitalPropagatorCondition
unsigned GetOrbitNumber () const
 Return the orbit number.
void SetOrbitNumber (unsigned aOrbitNumber)
 Set the orbit number.
Public Member Functions inherited from WsfObject
 WsfObject ()
 This is the constructor for the WsfObject class.
 ~WsfObject () override
 This is the destructor for the WsfObject class.
const char * GetScriptClassName () const override
const std::string & GetType () const
WsfStringId GetTypeId () const
 Get the string ID of the 'type' of the object.
void SetType (WsfStringId aType)
const std::string & GetBaseType () const
WsfStringId GetBaseTypeId () const
const TypeListGetTypeList () const
bool IsA_TypeOf (WsfStringId aType) const
WsfObjectoperator= (const WsfObject &aRhs)
 Assignment operator.
template<typename T>
void Serialize (T &aBuff)
 For XIO (de)serialization.
const std::string & GetName () const
WsfStringId GetNameId () const
void SetName (WsfStringId aName)

Static Public Attributes

static constexpr const char * cTYPE {"relative_time"}

Additional Inherited Members

Public Types inherited from WsfObject
typedef std::vector< WsfStringIdTypeList
 The list of types returned by GetTypeList.
 WsfObject (const WsfObject &aSrc)
 Copy constructor (for Clone()).
Protected Attributes inherited from wsf::space::OrbitalPropagatorCondition
unsigned mOrbitNumber {0}

Detailed Description

A condition that obtains after a given time has elapsed.

Constructor & Destructor Documentation

◆ RelativeTimeCondition()

wsf::space::RelativeTimeCondition::RelativeTimeCondition ( )
inline

References cTYPE, and WsfObject::SetType().

Referenced by Clone().

Member Function Documentation

◆ Accept()

void wsf::space::RelativeTimeCondition::Accept ( OrbitalPropagatorConditionVisitor & aVisitor)
overridevirtual

◆ Clone()

RelativeTimeCondition * wsf::space::RelativeTimeCondition::Clone ( ) const
inlineoverridevirtual

Return a copy of this object. Must be implemented by all derived types. If cloning is impossible, a WsfUncloneableException should be thrown.

Implements wsf::space::OrbitalPropagatorCondition.

References RelativeTimeCondition().

◆ GetConditionString()

std::string wsf::space::RelativeTimeCondition::GetConditionString ( ) const
inlineoverridevirtual

Return the string identifying the condition.

Implements wsf::space::OrbitalPropagatorCondition.

◆ GetOffsetTime()

UtTimeValue wsf::space::RelativeTimeCondition::GetOffsetTime ( ) const
inline

◆ GetTimeToCondition()

bool wsf::space::RelativeTimeCondition::GetTimeToCondition ( const UtOrbitalPropagatorBase & aPropagator,
double & aTimeToCondition ) const
overridevirtual

Get the time at which the condition is satisfied. This method computes the time in seconds from the current time of the aPropagator at which the condition is satisfied. If the method is able to compute such a time, the aTimeToCondition is set to the appropriate value and this method returns true. If the method is unable to determine when the condition obtains, then the method returns false.

Parameters
aPropagator- The propagator for which the time to the condition being satisfied is desired.
aTimeToCondition[out] - The time in seconds from the current time of the provided aPropagator at which the condition is satisfied.
Returns
true if the time was able to be determined; false otherwise.

Implements wsf::space::OrbitalPropagatorCondition.

References wsf::space::OrbitalPropagatorCondition::mOrbitNumber.

◆ ProcessInput()

bool wsf::space::RelativeTimeCondition::ProcessInput ( UtInput & aInput)
overridevirtual

Process input from a generic source.

Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.

Parameters
aInputa reference to a UtInput object.
Returns
'true' if the command was one recognized by the class or 'false' if not.
Exceptions
UtInput::ExceptionBase(or an object derived from it) if the command was recognized but contains some sort of error.
Note
If a derived class does not recognize the command (i.e.: the return value is false) then it should call the base class ProcessInput method. This chain should continue until either the command is recognized or the top-level base class is encountered.

Reimplemented from wsf::space::OrbitalPropagatorCondition.

◆ SetOffsetTime()

void wsf::space::RelativeTimeCondition::SetOffsetTime ( const UtTimeValue & aOffsetTime)
inline

◆ ValidateParameterRanges()

bool wsf::space::RelativeTimeCondition::ValidateParameterRanges ( ) const
overridevirtual

Validate any input parameters for the conditions. This method should be overridden for conditions that take parameters for which there are some restrictions on their values (e.g., the parameter must be positive). If the parameter is outside the allowed range, this method should print an error and return false.

Returns
true if all parameters are valid; false otherwise.

Reimplemented from wsf::space::OrbitalPropagatorCondition.

Member Data Documentation

◆ cTYPE


The documentation for this class was generated from the following files:
Copyrights Multiple, All Rights Reserved