|
WSF
|
#include <WsfDeferredInput.hpp>
Classes | |
| struct | Loader |
Public Types | |
| using | UniqueId = std::pair<std::string, std::string> |
| using | ProcessInputFunction = std::function<bool(UtInput&)> |
Public Member Functions | |
| WsfDeferredInput () | |
| bool | IsDelayLoading () |
| void | DelayLoad (const std::string &aKind, const std::string &aName, const UtInput::StoredLocation &aPosition, const ProcessInputFunction &aInputFunction) |
| void | Requires (const std::string &aKind, const std::string &aName) |
| void | MaybeRequires (const std::string &aKind, const std::string &aName) |
| void | Resolve (UtInput &aInput) |
| void | Clear () |
| void | ResetDelays () |
Protected Types | |
| using | LoaderMap = std::multimap<UniqueId, Loader> |
Protected Member Functions | |
| bool | IsDelayLoadingP () |
| void | DelayLoadP (const std::string &aKind, const std::string &aName, const UtInput::StoredLocation &aPosition, const ProcessInputFunction &aInputFunction) |
| void | RequiresP (const std::string &aKind, const std::string &aName) |
| void | ResolveP (UtInput &aInput) |
| void | ResetDelaysP () |
| void | ClearP () |
Protected Attributes | |
| bool | mIsDelayLoading |
| UtInput * | mRootInputPtr |
| LoaderMap | mDelayLoaders |
| std::set< UniqueId > | mCurrentlyLoading |
| std::vector< UtInput * > | mInputStack |
| std::set< UniqueId > | mCompleted |
| std::vector< UniqueId > | mDelayLoadOrder |
Contains input utilities for WSF.
WSF does 'delayed' loading for many types of objects. When delay loading, an object's kind and name are scanned, remembered, and bypassed until a later time.
For instance: sensor MySensor MySensorTYPE ... end_sensor Here, 'sensor MySensor' is saved using WsfDeferredInput::DelayLoad(), and then the entire block is skipped until all initial input processing has been completed. Finally, WsfDeferredInput::Resolve() finishes reading the delay load blocks. If an object depends on another object at input-time, a call to WsfDeferredInput::Requires() ensures that dependency is met before input processing continues.
Any object which has input-time dependencies should use the delay load feature.
|
protected |
| using WsfDeferredInput::ProcessInputFunction = std::function<bool(UtInput&)> |
| using WsfDeferredInput::UniqueId = std::pair<std::string, std::string> |
| WsfDeferredInput::WsfDeferredInput | ( | ) |
References mCompleted, mCurrentlyLoading, mDelayLoaders, mDelayLoadOrder, mInputStack, mIsDelayLoading, and mRootInputPtr.
|
inline |
References ClearP().
|
protected |
References mCompleted, mCurrentlyLoading, mDelayLoaders, mDelayLoadOrder, mInputStack, mIsDelayLoading, and mRootInputPtr.
Referenced by Clear().
|
inline |
References DelayLoadP().
Referenced by WsfScenario::LoadPlatformInstance(), WsfPlatformTypes::LoadType(), and WsfObjectTypeListBase::LoadTypeP().
|
protected |
References mDelayLoaders, mDelayLoadOrder, WsfDeferredInput::Loader::mInputFunction, and WsfDeferredInput::Loader::mLocation.
Referenced by DelayLoad().
|
inline |
Returns true if the delay load phase is active. In this phase, types that were skipped during the first pass are finally processed.
References IsDelayLoadingP().
|
protected |
References mIsDelayLoading.
Referenced by IsDelayLoading().
| void WsfDeferredInput::MaybeRequires | ( | const std::string & | aKind, |
| const std::string & | aName ) |
References mDelayLoaders, and Requires().
Referenced by WsfEW_EffectTypes::LoadInstance(), WsfEW_TechniqueTypes::LoadInstance(), WsfFilterTypes::LoadInstance(), and WsfEW_FalseTargetEffect::FT_Data::ProcessInput().
|
inline |
References RequiresP().
Referenced by WsfObjectTypeListBase::CloneP(), WsfObjectTypeListBase::LoadComponentP(), WsfRouteTypes::LoadInstance(), wsf::comm::medium::Types::LoadMedium(), WsfScenario::LoadPlatformInstance(), wsf::comm::ProtocolTypes::LoadProtocolComponent(), wsf::comm::router::ProtocolTypes::LoadProtocolComponent(), WsfPlatformTypes::LoadType(), WsfObjectTypeListBase::LoadTypeP(), MaybeRequires(), wsf::altloc::Component::ProcessInput(), WsfRoute::ProcessNavigationInput(), and ResolveP().
|
protected |
References mCompleted, mCurrentlyLoading, mDelayLoaders, mInputStack, mIsDelayLoading, and mRootInputPtr.
Referenced by Requires().
|
inline |
References ResetDelaysP().
|
protected |
References mCompleted, mDelayLoaders, and mDelayLoadOrder.
Referenced by ResetDelays().
|
inline |
References ResolveP().
|
protected |
References mDelayLoadOrder, mIsDelayLoading, mRootInputPtr, and Requires().
Referenced by Resolve().
|
protected |
Referenced by ClearP(), RequiresP(), ResetDelaysP(), and WsfDeferredInput().
|
protected |
Referenced by ClearP(), RequiresP(), and WsfDeferredInput().
|
protected |
Referenced by ClearP(), DelayLoadP(), MaybeRequires(), RequiresP(), ResetDelaysP(), and WsfDeferredInput().
|
protected |
Referenced by ClearP(), DelayLoadP(), ResetDelaysP(), ResolveP(), and WsfDeferredInput().
|
protected |
Referenced by ClearP(), RequiresP(), and WsfDeferredInput().
|
protected |
Referenced by ClearP(), IsDelayLoadingP(), RequiresP(), ResolveP(), and WsfDeferredInput().
|
protected |
Referenced by ClearP(), RequiresP(), ResolveP(), and WsfDeferredInput().