37 std::cout <<
"Module::update" << std::endl;
99 if (!f_in->isOptional() && f_in->isEmpty())
104 std::string errMsg = std::string(
"The input field ") + f_in->getObjectName() +
105 std::string(
" in Module ") + this->getClassInfo()->getClassName() + std::string(
" is not set!");
122 if (f_out->isEmpty())
127 std::string errMsg = std::string(
"The output field ") + f_out->getObjectName() +
128 std::string(
" in Module ") + this->getClassInfo()->getClassName() + std::string(
" is not prepared!");
209 if (this->varForceUpdate()->getValue())
215 bool modified =
false;
218 modified |= f_in->isModified();
224 modified |= var->isModified();
259 if (node == NULL)
return NULL;
261 return node->getSceneGraph();
266 this->varForceUpdate()->setValue(b);
FieldTypeEnum getFieldType()
void setParent(OBase *owner)
void setObjectName(std::string name)
void setAutoDestroy(bool autoDestroy)
void setDescription(std::string description)
@ Error
Error information while executing something.
static void sendMessage(MessageType type, const std::string &text)
Add a new message to log.
virtual void updateImpl()
SceneGraph * getSceneGraph()
void setName(std::string name)
virtual bool validateOutputs()
virtual bool allowImported()
virtual void setParentNode(Node *node)
Set the parent node.
virtual void preprocess()
virtual bool allowExported()
std::vector< ModulePort * > mExportModules
void setUpdateAlways(bool b)
Set the update strategy for the module.
virtual void postprocess()
virtual bool initializeImpl()
bool appendExportModule(ModulePort *nodePort)
bool isInputComplete()
Check the completeness of input fields.
bool connect(ModulePort *nPort)
std::string getName() override
virtual void updateStarted()
Two functions called at the beginning and end of update() used for debug.
bool addModulePort(ModulePort *port)
Module(std::string name="default")
std::vector< ModulePort * > mImportModules
bool removeExportModule(ModulePort *nodePort)
virtual bool requireUpdate()
std::string m_module_name
bool disconnect(ModulePort *nPort)
virtual void updateEnded()
virtual bool validateInputs()
bool attachField(FBase *field, std::string name, std::string desc, bool autoDestroy=true) override
Attach a field to Base.
virtual bool removeModule(Module *m)=0
virtual bool addModule(Module *m)=0
SceneGraph * getSceneGraph()
std::vector< FBase * > fields_param
bool addParameter(FBase *field)
std::vector< FBase * > fields_output
std::vector< FBase * > fields_input
bool addOutputField(FBase *field)
bool addInputField(FBase *field)
bool isValidationInfoPrintable()
This is an implementation of AdditiveCCD based on peridyno.