CIRCT  19.0.0git
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
esi::Manifest::Impl Class Reference
Collaboration diagram for esi::Manifest::Impl:
Collaboration graph
[legend]

Public Member Functions

 Impl (Context &ctxt, const std::string &jsonManifest)
 
auto at (const std::string &key) const
 
std::optional< ModuleInfogetModInfo (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. More...
 
services::ServicegetService (AppIDPath idPath, AcceleratorConnection &, const nlohmann::json &, ServiceTable &activeServices) const
 Get a Service for the service specified in 'json'. More...
 
std::vector< services::Service * > getServices (AppIDPath idPath, AcceleratorConnection &, const nlohmann::json &, ServiceTable &activeServices) const
 Get all the services in the description of an instance. More...
 
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'. More...
 
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. More...
 
std::unique_ptr< InstancegetChildInstance (AppIDPath idPath, AcceleratorConnection &acc, ServiceTable activeServices, const nlohmann::json &childJson) const
 Get a single child instance. More...
 
void populateTypes (const nlohmann::json &typesJson)
 Parse all the types and populate the types table. More...
 
const std::vector< const Type * > & getTypeTable () const
 Get the ordered list of types from the manifest. More...
 
std::unique_ptr< AcceleratorbuildAccelerator (AcceleratorConnection &acc) const
 Build a dynamic API for the Accelerator connection 'acc' based on the manifest stored herein. More...
 
const TypeparseType (const nlohmann::json &typeJson)
 

Private Member Functions

std::optional< const Type * > getType (Type::ID id) const
 

Private Attributes

Contextctxt
 
std::vector< const Type * > _typeTable
 
nlohmann::json manifestJson
 
std::map< std::string, ModuleInfosymbolInfoCache
 

Friends

class ::esi::Manifest
 

Detailed Description

Definition at line 36 of file Manifest.cpp.

Constructor & Destructor Documentation

◆ Impl()

esi::Manifest::Impl::Impl ( Context ctxt,
const std::string &  jsonManifest 
)

Member Function Documentation

◆ at()

auto esi::Manifest::Impl::at ( const std::string &  key) const
inline

◆ buildAccelerator()

std::unique_ptr< Accelerator > esi::Manifest::Impl::buildAccelerator ( AcceleratorConnection acc) const

Build a dynamic API for the Accelerator connection 'acc' based on the manifest stored herein.

Definition at line 206 of file Manifest.cpp.

Referenced by esi::Manifest::buildAccelerator().

◆ getBundlePorts()

std::vector< std::unique_ptr< BundlePort > > esi::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 353 of file Manifest.cpp.

References esi::services::Service::getPort(), esi::ServicePortDesc::name, parseID(), parseServicePort(), and esi::AcceleratorConnection::requestChannelsFor().

◆ getChildInstance()

std::unique_ptr< Instance > esi::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 272 of file Manifest.cpp.

References parseID().

◆ getChildInstances()

std::vector< std::unique_ptr< Instance > > esi::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 259 of file Manifest.cpp.

◆ getModInfo()

std::optional< ModuleInfo > esi::Manifest::Impl::getModInfo ( const nlohmann::json &  json) const

Definition at line 227 of file Manifest.cpp.

◆ getService()

services::Service * esi::Manifest::Impl::getService ( AppIDPath  idPath,
AcceleratorConnection acc,
const nlohmann::json &  svcJson,
ServiceTable activeServices 
) const

Get a Service for the service specified in 'json'.

Update the activeServices table.

Definition at line 288 of file Manifest.cpp.

References getAny(), esi::AcceleratorConnection::getService(), esi::HWClientDetail::implOptions, parseID(), parseIDPath(), parseServicePort(), esi::HWClientDetail::port, and esi::HWClientDetail::relPath.

◆ getServices()

std::vector< services::Service * > esi::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 338 of file Manifest.cpp.

◆ getType()

std::optional<const Type *> esi::Manifest::Impl::getType ( Type::ID  id) const
inlineprivate

Definition at line 102 of file Manifest.cpp.

References esi::Manifest::Impl::ctxt, and esi::Context::getType().

◆ getTypeTable()

const std::vector<const Type *>& esi::Manifest::Impl::getTypeTable ( ) const
inline

Get the ordered list of types from the manifest.

Definition at line 89 of file Manifest.cpp.

References esi::Manifest::Impl::_typeTable.

Referenced by esi::Manifest::getTypeTable().

◆ parseType()

const Type * esi::Manifest::Impl::parseType ( const nlohmann::json &  typeJson)

Definition at line 508 of file Manifest.cpp.

References esiaccel.accelerator::ctxt, and parseType().

◆ populateTypes()

void esi::Manifest::Impl::populateTypes ( const nlohmann::json &  typesJson)

Parse all the types and populate the types table.

Definition at line 512 of file Manifest.cpp.

References parseType().

Referenced by esi::Manifest::Impl::Impl().

◆ scanServiceDecls()

void esi::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 237 of file Manifest.cpp.

References getAny(), and esi::AcceleratorConnection::getService().

Friends And Related Function Documentation

◆ ::esi::Manifest

friend class ::esi::Manifest
friend

Definition at line 37 of file Manifest.cpp.

Member Data Documentation

◆ _typeTable

std::vector<const Type *> esi::Manifest::Impl::_typeTable
private

Definition at line 100 of file Manifest.cpp.

Referenced by esi::Manifest::Impl::getTypeTable().

◆ ctxt

Context& esi::Manifest::Impl::ctxt
private

Definition at line 99 of file Manifest.cpp.

Referenced by esi::Manifest::Impl::getType().

◆ manifestJson

nlohmann::json esi::Manifest::Impl::manifestJson
private

Definition at line 107 of file Manifest.cpp.

Referenced by esi::Manifest::Impl::at(), and esi::Manifest::Impl::Impl().

◆ symbolInfoCache

std::map<std::string, ModuleInfo> esi::Manifest::Impl::symbolInfoCache
private

Definition at line 109 of file Manifest.cpp.

Referenced by esi::Manifest::Impl::Impl().


The documentation for this class was generated from the following file: