Jump to content

rafaelkioji

Members
  • Content Count

    2
  • Joined

  • Last visited

  1. rafaelkioji

    Dynamically allocating modules.

    It works!! Very Nice trick!!!!! Thank you very much.
  2. rafaelkioji

    Dynamically allocating modules.

    Hi, I'm trying to dynamically allocate N instances of a single module type. I'm trying to use the following algorithm: int N = 5; TMyModuleType *(module[N]); std::string moduleName; for( unsigned int i =0; i < N; i++ ) { moduleName = std::string::to_string("module[%d]", i); module[N] = new TMyModuleType(moduleName) } However the module's name is a legacy of sc_module hierarchy (SC_MODULE), which type is sc_module_name and is not compatible with std::string. How should I initialize dynamically allocated modules? I've already tried to use sc_string, but it's not compatible neither. best regards, Rafael Kioji
×