131 std::stringstream name;
132 std::stringstream ss;
133 name << std::setw(40) << m->getClassInfo()->getClassName();
136 std::string info =
"\t Module: " + name.str() +
": \t " + ss.str() +
"ms";
177 std::queue<Module*> moduleQueue;
178 std::set<ObjectId> moduleSet;
189 auto retrieveModules = [&](
ObjectId id, std::vector<FBase *>& fields) {
190 for(
auto f : fields) {
191 auto& sinks = f->getSinks();
192 for(
auto sink : sinks)
195 if (module !=
nullptr)
200 if (moduleSet.find(oId) == moduleSet.end() &&
mModuleMap.count(oId) > 0)
202 moduleSet.insert(oId);
203 moduleQueue.push(module);
211 retrieveModules(
baseId, fields);
218 auto flushQueue = [&]()
220 while (!moduleQueue.empty())
222 Module* m = moduleQueue.front();
225 retrieveModules(m->
objectId(), outFields);
254 ObjectId oId = m.second->objectId();
255 if (moduleSet.find(oId) == moduleSet.end())
257 moduleSet.insert(oId);
258 moduleQueue.push(m.second.get());
double getElapsedTime()
return the elapsed time in (ms)
Graph class represents a directed graph.
void addEdge(ObjectId v, ObjectId w)
std::vector< ObjectId > & topologicalSort(ObjectId v)
FieldTypeEnum getFieldType()
@ Info
Information to user.
static void sendMessage(MessageType type, const std::string &text)
Add a new message to log.
virtual void setParentNode(Node *node)
Set the parent node.
Module(std::string name="default")
bool addModule(std::shared_ptr< Module > module)
Add a module to m_module_list and other special module lists.
bool deleteModule(std::shared_ptr< Module > module)
std::vector< FBase * > & getAllFields()
std::vector< FBase * > & getOutputFields()
bool removeOutputField(FBase *field)
bool addOutputField(FBase *field)
static ObjectId baseId()
Base Id.
std::list< std::shared_ptr< Module > > mModuleList
uint sizeOfDynamicModules()
std::map< ObjectId, std::shared_ptr< Module > > mModuleMap
uint sizeOfPersistentModules()
void pushModule(std::shared_ptr< Module > m)
virtual bool printDebugInfo()
void updateExecutionQueue()
FBase * promoteOutputToNode(FBase *base)
void pushPersistentModule(std::shared_ptr< Module > m)
bool requireUpdate() final
void demoteOutputFromNode(FBase *base)
std::list< std::shared_ptr< Module > > mPersistentModule
void updateImpl() override
void popModule(std::shared_ptr< Module > m)
void reconstructPipeline()
This is an implementation of AdditiveCCD based on peridyno.