From 3f1b1535e3d68fb3daac33cdf90299ee9a2a1fc3 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Mon, 30 Aug 2021 00:54:31 -0400 Subject: [PATCH] Add Module::getNum*(). --- include/engine/Module.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/engine/Module.hpp b/include/engine/Module.hpp index 1bb83db3..9b0eb516 100644 --- a/include/engine/Module.hpp +++ b/include/engine/Module.hpp @@ -238,15 +238,27 @@ struct Module { int64_t getId() { return id; } + int getNumParams() { + return params.size(); + } Param& getParam(int index) { return params[index]; } + int getNumInputs() { + return inputs.size(); + } Input& getInput(int index) { return inputs[index]; } + int getNumOutputs() { + return outputs.size(); + } Output& getOutput(int index) { return outputs[index]; } + int getNumLights() { + return lights.size(); + } Light& getLight(int index) { return lights[index]; }