helics
3.5.2
|
Classes | |
class | CoreBuilder |
class | CoreTypeBuilder |
Functions | |
void | defineCoreBuilder (std::shared_ptr< CoreBuilder > builder, std::string_view name, int code) |
std::vector< std::string > | getAvailableCoreTypes () |
std::shared_ptr< Core > | makeCore (CoreType type, std::string_view name) |
std::shared_ptr< Core > | getEmptyCore () |
Core * | getEmptyCorePtr () |
std::shared_ptr< Core > | create (std::string_view initializationString) |
std::shared_ptr< Core > | create (CoreType type, std::string_view configureString) |
std::shared_ptr< Core > | create (CoreType type, std::string_view coreName, std::string_view configureString) |
std::shared_ptr< Core > | create (std::vector< std::string > args) |
std::shared_ptr< Core > | create (CoreType type, std::vector< std::string > args) |
std::shared_ptr< Core > | create (CoreType type, std::string_view coreName, std::vector< std::string > args) |
std::shared_ptr< Core > | create (int argc, char *argv[]) |
std::shared_ptr< Core > | create (CoreType type, int argc, char *argv[]) |
std::shared_ptr< Core > | create (CoreType type, std::string_view coreName, int argc, char *argv[]) |
std::shared_ptr< Core > | FindOrCreate (CoreType type, std::string_view coreName, std::vector< std::string > args) |
std::shared_ptr< Core > | FindOrCreate (CoreType type, std::string_view coreName, std::string_view configureString) |
std::shared_ptr< Core > | FindOrCreate (CoreType type, std::string_view coreName, int argc, char *argv[]) |
std::shared_ptr< Core > | findCore (std::string_view name) |
std::shared_ptr< Core > | findJoinableCoreOfType (CoreType type) |
bool | registerCore (const std::shared_ptr< Core > &core, CoreType type) |
size_t | cleanUpCores () |
size_t | cleanUpCores (std::chrono::milliseconds delay) |
void | terminateAllCores () |
void | abortAllCores (int errorCode, std::string_view errorString) |
size_t | getCoreCount () |
bool | copyCoreIdentifier (std::string_view copyFromName, std::string_view copyToName) |
void | unregisterCore (std::string_view name) |
void | addAssociatedCoreType (std::string_view name, CoreType type) |
void | displayHelp (CoreType type) |
template<class CoreTYPE > | |
std::shared_ptr< CoreBuilder > | addCoreType (std::string_view coreTypeName, int code) |
Factory for building Core API instances. available core types
void helics::CoreFactory::abortAllCores | ( | int | errorCode, |
std::string_view | errorString | ||
) |
abort all cores
References abortAllCores(), cleanUpCores(), and helics::gLocalCoreId().
Referenced by abortAllCores().
void helics::CoreFactory::addAssociatedCoreType | ( | std::string_view | name, |
CoreType | type | ||
) |
add a type associated with a core
References addAssociatedCoreType().
Referenced by addAssociatedCoreType().
std::shared_ptr<CoreBuilder> helics::CoreFactory::addCoreType | ( | std::string_view | coreTypeName, |
int | code | ||
) |
template function to create a builder and link it into the library
size_t helics::CoreFactory::cleanUpCores | ( | ) |
clean up unused cores
when Cores are unregistered they get put in a holding area that gets cleaned up when a new Core is registered or when the clean up function is called this prevents some odd threading issues
References cleanUpCores().
Referenced by abortAllCores(), cleanUpCores(), helics::cleanupHelicsLibrary(), helicsCloseLibrary(), helicsCoreFree(), helicsFederateFree(), and terminateAllCores().
size_t helics::CoreFactory::cleanUpCores | ( | std::chrono::milliseconds | delay | ) |
clean up unused cores
when Cores are unregistered they get put in a holding area that gets cleaned up when a new Core is registered or when the clean up function is called this prevents some odd threading issues
delay | the delay time in milliseconds to wait for the cores to finish before destroying |
References cleanUpCores().
bool helics::CoreFactory::copyCoreIdentifier | ( | std::string_view | copyFromName, |
std::string_view | copyToName | ||
) |
make a copy of the core pointer to allow access to the new name
References copyCoreIdentifier().
Referenced by copyCoreIdentifier().
create a core from a type and command line arguments
type | the type of core to create |
argc | the number of command line arguments |
argv | the actual string parameters for the command line |
std::shared_ptr< Core > helics::CoreFactory::create | ( | CoreType | type, |
std::string_view | coreName, | ||
int | argc, | ||
char * | argv[] | ||
) |
create a core from a type, name, and arguments
type | the type of core to create |
coreName | the name for the core |
argc | the number of arguments |
argv | the actual argument parameters |
References registerCore().
std::shared_ptr< Core > helics::CoreFactory::create | ( | CoreType | type, |
std::string_view | coreName, | ||
std::string_view | configureString | ||
) |
create a core from a type, name, and initializationString
type | the type of core to create |
coreName | the name for the core |
configureString | a string containing arguments for configuration of the core |
References registerCore().
std::shared_ptr< Core > helics::CoreFactory::create | ( | CoreType | type, |
std::string_view | coreName, | ||
std::vector< std::string > | args | ||
) |
create a core from a type, name, and arguments
type | the type of core to create |
coreName | the name for the core |
args | a vector of reversed command line arguments |
References registerCore().
std::shared_ptr< Core > helics::CoreFactory::create | ( | CoreType | type, |
std::vector< std::string > | args | ||
) |
create a core from a type and command line arguments
type | the type of core to create |
args | a vector of reversed command line arguments |
std::shared_ptr< Core > helics::CoreFactory::create | ( | int | argc, |
char * | argv[] | ||
) |
create a core from arguments
an argument of '–coretype' must be specified to define the type, otherwise the default type is used
argc | the number of arguments |
argv | the actual argument parameters |
std::shared_ptr< Core > helics::CoreFactory::create | ( | std::vector< std::string > | args | ) |
create a core from arguments
an argument of '–coretype' must be specified to define the type, otherwise the default type is used
args | a vector of reversed command line arguments |
void helics::CoreFactory::displayHelp | ( | CoreType | type = CoreType::UNRECOGNIZED | ) |
display the help listing for a particular CoreType
std::shared_ptr< Core > helics::CoreFactory::findCore | ( | std::string_view | name | ) |
locate a registered Core by name
name | the name of the core to find |
References findCore().
Referenced by helics::CoreApp::CoreApp(), findCore(), FindOrCreate(), and helics::CommonCore::unregister().
try to find a joinable core of a specific type
References findJoinableCoreOfType().
Referenced by findJoinableCoreOfType().
std::shared_ptr< Core > helics::CoreFactory::FindOrCreate | ( | CoreType | type, |
std::string_view | coreName, | ||
int | argc, | ||
char * | argv[] | ||
) |
tries to find a named core if it fails it creates a new one
References findCore(), FindOrCreate(), and registerCore().
std::shared_ptr< Core > helics::CoreFactory::FindOrCreate | ( | CoreType | type, |
std::string_view | coreName, | ||
std::string_view | configureString | ||
) |
tries to find a named core if it fails it creates a new one
References findCore(), FindOrCreate(), and registerCore().
std::shared_ptr< Core > helics::CoreFactory::FindOrCreate | ( | CoreType | type, |
std::string_view | coreName, | ||
std::vector< std::string > | args | ||
) |
tries to find a named core if it fails it creates a new one
References findCore(), FindOrCreate(), and registerCore().
Referenced by FindOrCreate(), helicsCreateCore(), and helicsCreateCoreFromArgs().
std::vector< std::string > helics::CoreFactory::getAvailableCoreTypes | ( | ) |
generate a vector of the currently available core types
References getAvailableCoreTypes().
Referenced by getAvailableCoreTypes(), and helics::core::systemInfo().
size_t helics::CoreFactory::getCoreCount | ( | ) |
std::shared_ptr< Core > helics::CoreFactory::getEmptyCore | ( | ) |
get a shared pointer to an empty core
References getEmptyCore().
Referenced by helics::Federate::disconnect(), helics::Federate::Federate(), getEmptyCore(), and helics::Federate::operator=().
Core * helics::CoreFactory::getEmptyCorePtr | ( | ) |
get a pointer to an emptyCore
References getEmptyCorePtr().
Referenced by helics::Interface::close(), helics::Interface::disconnectFromCore(), and getEmptyCorePtr().
register a testCore so it can be found by others
also cleans up any leftover Cores that were previously unregistered this can be controlled by calling cleanUpCores earlier if desired
core | a pointer to a testCore object that should be found globally |
type | the type of core to create |
References registerCore().
Referenced by create(), FindOrCreate(), and registerCore().
void helics::CoreFactory::terminateAllCores | ( | ) |
terminate All existing cores
References cleanUpCores(), and terminateAllCores().
Referenced by terminateAllCores().
void helics::CoreFactory::unregisterCore | ( | std::string_view | name | ) |
remove a Core from the registry
name | the name of the Core to unregister |
References unregisterCore().
Referenced by helics::CommonCore::unregister(), and unregisterCore().