QuISP
Loading...
Searching...
No Matches
ModuleType.h
Go to the documentation of this file.
1#pragma once
2
3#include <omnetpp.h>
4#include <string>
5#include "Configuration.h"
6
7namespace quisp_test {
8namespace module_type {
9
10using namespace omnetpp;
11
12class TestModuleType : public cModuleType {
13 private:
14 cProperties *props;
15 cConfiguration *cfg;
16
17 public:
18 TestModuleType(const char *name) : cModuleType(name) {
20 cfg = new Configuration;
21 props = new cProperties;
22 }
23
24 cModule *createModuleObject() override { return nullptr; };
25 void addParametersAndGatesTo(cModule *module) override{};
26 void applyPatternAssignments(cComponent *component) override{};
27 void setupGateVectors(cModule *module) override{};
28 void buildInside(cModule *module) override{};
29
30 // methods redefined from cComponentType
31 cProperties *getProperties() const override { return props; };
32 cProperties *getParamProperties(const char *paramName) const override { return nullptr; };
33 cProperties *getGateProperties(const char *gateName) const override { return nullptr; };
34 cProperties *getSubmoduleProperties(const char *submoduleName, const char *submoduleType) const override { return nullptr; };
35 cProperties *getConnectionProperties(int connectionId, const char *channelType) const override { return nullptr; };
36 std::string getPackageProperty(const char *name) const override { return std::string("mock package property"); };
37 const char *getImplementationClassName() const override { return "TestModuleType"; };
38 std::string getCxxNamespace() const override { return std::string("mock namespace"); };
39#if OMNETPP_VERSION >= 0x600 && OMNETPP_BUILDNUM > 1531
40 std::string getCxxNamespaceForType(const char *type) const override { return "mock cxx namespace"; };
41#endif
42
43 const char *getSourceFileName() const override { return "no source"; };
44 bool isInnerType() const override { return false; };
45
46 std::string str() const override { return "test module type"; };
47 std::string getNedSource() const override { return ""; };
48 bool isNetwork() const override { return false; };
49 bool isSimple() const override { return true; };
50};
51
52} // namespace module_type
53} // namespace quisp_test
Definition Configuration.h:10
Definition ModuleType.h:12
std::string str() const override
Definition ModuleType.h:46
cConfiguration * cfg
Definition ModuleType.h:15
cProperties * getGateProperties(const char *gateName) const override
Definition ModuleType.h:33
void buildInside(cModule *module) override
Definition ModuleType.h:28
void addParametersAndGatesTo(cModule *module) override
Definition ModuleType.h:25
cProperties * getProperties() const override
Definition ModuleType.h:31
const char * getImplementationClassName() const override
Definition ModuleType.h:37
bool isSimple() const override
Definition ModuleType.h:49
void setupGateVectors(cModule *module) override
Definition ModuleType.h:27
bool isNetwork() const override
Definition ModuleType.h:48
const char * getSourceFileName() const override
Definition ModuleType.h:43
cProperties * getSubmoduleProperties(const char *submoduleName, const char *submoduleType) const override
Definition ModuleType.h:34
std::string getPackageProperty(const char *name) const override
Definition ModuleType.h:36
std::string getCxxNamespace() const override
Definition ModuleType.h:38
TestModuleType(const char *name)
Definition ModuleType.h:18
cModule * createModuleObject() override
Definition ModuleType.h:24
void applyPatternAssignments(cComponent *component) override
Definition ModuleType.h:26
cProperties * getParamProperties(const char *paramName) const override
Definition ModuleType.h:32
bool isInnerType() const override
Definition ModuleType.h:44
cProperties * getConnectionProperties(int connectionId, const char *channelType) const override
Definition ModuleType.h:35
cProperties * props
Definition ModuleType.h:14
std::string getNedSource() const override
Definition ModuleType.h:47
Definition test.h:15