|
CIRCT 24.0.0git
|

Public Member Functions | |
| Impl (Context &ctxt, const std::string &jsonManifest) | |
| auto | at (const std::string &key) const |
| std::optional< ModuleInfo > | getModInfo (const nlohmann::json &) const |
| void | scanServiceDecls (AcceleratorConnection &, const nlohmann::json &, ServiceTable &) const |
| Go through the "service_decls" section of the manifest and populate the services table as appropriate. | |
| void | createEngine (AcceleratorConnection &, AppIDPath appID, const nlohmann::json &) const |
| TODO: Hack. | |
| services::Service * | getService (AppIDPath idPath, AcceleratorConnection &, const nlohmann::json &, ServiceTable &activeServices, bool isEngine=false) const |
| Get a Service for the service specified in 'json'. | |
| std::vector< services::Service * > | getServices (AppIDPath idPath, AcceleratorConnection &, const nlohmann::json &, ServiceTable &activeServices) const |
| Get all the services in the description of an instance. | |
| std::vector< std::unique_ptr< BundlePort > > | getBundlePorts (AcceleratorConnection &acc, AppIDPath idPath, const ServiceTable &activeServices, const nlohmann::json &instJson) const |
| Get the bundle ports for the instance at 'idPath' and specified in 'instJson'. | |
| std::vector< std::unique_ptr< Instance > > | getChildInstances (AppIDPath idPath, AcceleratorConnection &acc, const ServiceTable &activeServices, const nlohmann::json &instJson) const |
| Build the set of child instances (recursively) for the module instance description. | |
| std::unique_ptr< Instance > | getChildInstance (AppIDPath idPath, AcceleratorConnection &acc, ServiceTable activeServices, const nlohmann::json &childJson) const |
| Get a single child instance. | |
| void | populateTypes (const nlohmann::json &typesJson) |
| Parse all the types and populate the types table. | |
| const std::vector< const Type * > & | getTypeTable () const |
| Get the ordered list of types from the manifest. | |
| std::unique_ptr< Accelerator > | buildAccelerator (AcceleratorConnection &acc) const |
| Build a dynamic API for the Accelerator connection 'acc' based on the manifest stored herein. | |
| const Type * | parseType (const nlohmann::json &typeJson) |
| const std::map< std::string, const ModuleInfo > & | getSymbolInfo () const |
Private Member Functions | |
| std::optional< const Type * > | getType (Type::ID id) const |
| std::any | getAny (const nlohmann::json &value) const |
| Convert the json value to a 'std::any', which can be exposed outside of this file. | |
| void | parseModuleMetadata (ModuleInfo &info, const nlohmann::json &mod) const |
| void | parseModuleConsts (ModuleInfo &info, const nlohmann::json &mod) const |
Private Attributes | |
| Context & | ctxt |
| std::vector< const Type * > | _typeTable |
| nlohmann::json | manifestJson |
| std::map< std::string, const ModuleInfo > | symbolInfoCache |
Friends | |
| class | ::esi::Manifest |
Definition at line 37 of file Manifest.cpp.
| Manifest::Impl::Impl | ( | Context & | ctxt, |
| const std::string & | jsonManifest ) |
Definition at line 258 of file Manifest.cpp.
References ctxt, manifestJson, parseModuleConsts(), parseModuleMetadata(), populateTypes(), and symbolInfoCache.
|
inline |
Definition at line 43 of file Manifest.cpp.
References manifestJson.
| std::unique_ptr< Accelerator > Manifest::Impl::buildAccelerator | ( | AcceleratorConnection & | acc | ) | const |
Build a dynamic API for the Accelerator connection 'acc' based on the manifest stored herein.
Definition at line 288 of file Manifest.cpp.
References buildAccelerator(), createEngine(), getBundlePorts(), getChildInstances(), getModInfo(), getServices(), manifestJson, and scanServiceDecls().
Referenced by buildAccelerator().
| void Manifest::Impl::createEngine | ( | AcceleratorConnection & | acc, |
| AppIDPath | idPath, | ||
| const nlohmann::json & | eng ) const |
TODO: Hack.
This method is a giant hack to reuse the getService method for engines. It works, but it ain't pretty and it ain't right.
Definition at line 330 of file Manifest.cpp.
References createEngine(), and getService().
Referenced by buildAccelerator(), and createEngine().
|
private |
Convert the json value to a 'std::any', which can be exposed outside of this file.
Definition at line 161 of file Manifest.cpp.
References getAny(), getType(), and parseID().
Referenced by getAny(), getService(), parseModuleConsts(), parseModuleMetadata(), and scanServiceDecls().
| std::vector< std::unique_ptr< BundlePort > > Manifest::Impl::getBundlePorts | ( | AcceleratorConnection & | acc, |
| AppIDPath | idPath, | ||
| const ServiceTable & | activeServices, | ||
| const nlohmann::json & | instJson ) const |
Get the bundle ports for the instance at 'idPath' and specified in 'instJson'.
Look them up in 'activeServies'.
Definition at line 478 of file Manifest.cpp.
References getBundlePorts(), getType(), parseIDChecked(), and parseServicePort().
Referenced by buildAccelerator(), getBundlePorts(), and getChildInstance().
| std::unique_ptr< Instance > Manifest::Impl::getChildInstance | ( | AppIDPath | idPath, |
| AcceleratorConnection & | acc, | ||
| ServiceTable | activeServices, | ||
| const nlohmann::json & | childJson ) const |
Get a single child instance.
Implicitly copy the active services table so that it can be safely updated for the child's branch of the tree.
Definition at line 373 of file Manifest.cpp.
References getBundlePorts(), getChildInstance(), getChildInstances(), getModInfo(), getServices(), and parseIDChecked().
Referenced by getChildInstance(), and getChildInstances().
| std::vector< std::unique_ptr< Instance > > Manifest::Impl::getChildInstances | ( | AppIDPath | idPath, |
| AcceleratorConnection & | acc, | ||
| const ServiceTable & | activeServices, | ||
| const nlohmann::json & | instJson ) const |
Build the set of child instances (recursively) for the module instance description.
Definition at line 360 of file Manifest.cpp.
References getChildInstance(), and getChildInstances().
Referenced by buildAccelerator(), getChildInstance(), and getChildInstances().
| std::optional< ModuleInfo > Manifest::Impl::getModInfo | ( | const nlohmann::json & | json | ) | const |
Definition at line 318 of file Manifest.cpp.
References getModInfo(), and symbolInfoCache.
Referenced by buildAccelerator(), getChildInstance(), and getModInfo().
| services::Service * Manifest::Impl::getService | ( | AppIDPath | idPath, |
| AcceleratorConnection & | acc, | ||
| const nlohmann::json & | svcJson, | ||
| ServiceTable & | activeServices, | ||
| bool | isEngine = false ) const |
Get a Service for the service specified in 'json'.
Update the activeServices table. TODO: re-using this for the engines section is a terrible hack. Figure out a better way.
Definition at line 389 of file Manifest.cpp.
References getAny(), getService(), parseIDChecked(), parseIDPath(), and parseServicePort().
Referenced by createEngine(), getService(), and getServices().
| std::vector< services::Service * > Manifest::Impl::getServices | ( | AppIDPath | idPath, |
| AcceleratorConnection & | acc, | ||
| const nlohmann::json & | svcsJson, | ||
| ServiceTable & | activeServices ) const |
Get all the services in the description of an instance.
Update the active services table.
Definition at line 464 of file Manifest.cpp.
References getService(), and getServices().
Referenced by buildAccelerator(), getChildInstance(), and getServices().
|
inline |
Definition at line 104 of file Manifest.cpp.
References symbolInfoCache.
|
inlineprivate |
Definition at line 112 of file Manifest.cpp.
References ctxt.
Referenced by getAny(), and getBundlePorts().
|
inline |
Get the ordered list of types from the manifest.
Definition at line 95 of file Manifest.cpp.
References _typeTable.
|
private |
Definition at line 241 of file Manifest.cpp.
References getAny(), and parseModuleConsts().
Referenced by Impl(), and parseModuleConsts().
|
private |
Definition at line 220 of file Manifest.cpp.
References getAny(), and parseModuleMetadata().
Referenced by Impl(), and parseModuleMetadata().
| const Type * Manifest::Impl::parseType | ( | const nlohmann::json & | typeJson | ) |
Definition at line 695 of file Manifest.cpp.
References ctxt, and parseType().
Referenced by parseType().
| void Manifest::Impl::populateTypes | ( | const nlohmann::json & | typesJson | ) |
Parse all the types and populate the types table.
Definition at line 699 of file Manifest.cpp.
References _typeTable, parseType(), and populateTypes().
Referenced by Impl(), and populateTypes().
| void Manifest::Impl::scanServiceDecls | ( | AcceleratorConnection & | acc, |
| const nlohmann::json & | svcDecls, | ||
| ServiceTable & | activeServices ) const |
Go through the "service_decls" section of the manifest and populate the services table as appropriate.
Definition at line 336 of file Manifest.cpp.
References getAny(), and scanServiceDecls().
Referenced by buildAccelerator(), and scanServiceDecls().
|
friend |
Definition at line 38 of file Manifest.cpp.
References ctxt.
|
private |
Definition at line 110 of file Manifest.cpp.
Referenced by getTypeTable(), and populateTypes().
|
private |
Definition at line 109 of file Manifest.cpp.
Referenced by ::esi::Manifest, getType(), Impl(), esiaccel.accelerator.AcceleratorConnection::manifest(), and parseType().
|
private |
Definition at line 121 of file Manifest.cpp.
Referenced by at(), buildAccelerator(), and Impl().
|
private |
Definition at line 123 of file Manifest.cpp.
Referenced by getModInfo(), getSymbolInfo(), and Impl().