Skip to content

Commit

Permalink
features: remove the SelfDoc from features. For use it, you should de…
Browse files Browse the repository at this point in the history
…fine the INET_WITH_SELFDOC macro.
  • Loading branch information
ZoltanBojthe committed Feb 3, 2025
1 parent 370d3d5 commit 56b088f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 16 deletions.
15 changes: 0 additions & 15 deletions .oppfeatures
Original file line number Diff line number Diff line change
Expand Up @@ -1866,21 +1866,6 @@
compileFlags = ""
linkerFlags = ""
/>
<feature
id = "SelfDoc"
name = "Self documenter"
description = "For generating documentation based on runtime actions."
initiallyEnabled = "false"
requires = ""
recommended = ""
labels = ""
nedPackages = "
inet.common.selfdoc
"
extraSourceFolders = ""
compileFlags = "-DINET_WITH_SELFDOC"
linkerFlags = ""
/>
<feature
id = "Z3GateSchedulingConfigurator"
name = "Z3 Gate Scheduling Configurator"
Expand Down
3 changes: 3 additions & 0 deletions src/inet/common/selfdoc/SelfDoc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// @author: Zoltan Bojthe
//

#ifdef INET_WITH_SELFDOC

#include <cstdarg>
#include <fstream>

Expand Down Expand Up @@ -149,3 +151,4 @@ std::string SelfDoc::gateInfo(cGate *gate)

} // namespace inet

#endif // INET_WITH_SELFDOC
5 changes: 4 additions & 1 deletion src/inet/common/selfdoc/SelfDoc.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
#ifndef __INET_SELFDOC_H
#define __INET_SELFDOC_H

#ifdef INET_WITH_SELFDOC

namespace inet {

class INET_API SelfDoc
Expand Down Expand Up @@ -61,7 +63,7 @@ class INET_API SelfDocTempOffClass
#endif

#define __Enter_Method_SelfDoc(...) \
if (SelfDoc::notInInitialize(__VA_ARGS__) && (__GET_SIMULATION()->__CSIMULATION_GET_SIMULATION_STAGE() != STAGE(CLEANUP))) { \
if (SelfDoc::generateSelfdoc && SelfDoc::notInInitialize(__VA_ARGS__) && (__GET_SIMULATION()->__CSIMULATION_GET_SIMULATION_STAGE() != STAGE(CLEANUP))) { \
auto __from = __ctx.getCallerContext(); \
std::string fromModuleName = __from ? __from->getParentModule() ? __from->getComponentType()->getFullName() : "-=Network=-" : "-=unknown=-"; \
std::string toModuleName = __GET_SIMULATION()->getContext()->getComponentType()->getFullName(); \
Expand Down Expand Up @@ -97,3 +99,4 @@ class INET_API SelfDocTempOffClass

#endif

#endif
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// SPDX-License-Identifier: LGPL-3.0-or-later
//

#ifdef INET_WITH_SELFDOC

#include "inet/common/selfdoc/SelfDocumenterFingerprintCalculator.h"

Expand Down Expand Up @@ -100,3 +101,4 @@ void SelfDocumenterFingerprintCalculator::addEvent(cEvent *event)

} // namespace

#endif // INET_WITH_SELFDOC
3 changes: 3 additions & 0 deletions src/inet/common/selfdoc/SelfDocumenterFingerprintCalculator.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#ifndef __INET_SELFDOCUMENTERFINGERPRINTCALCULATOR_H
#define __INET_SELFDOCUMENTERFINGERPRINTCALCULATOR_H

#ifdef INET_WITH_SELFDOC

#include "inet/common/INETDefs.h"

namespace inet {
Expand All @@ -21,3 +23,4 @@ class INET_API SelfDocumenterFingerprintCalculator : public cSingleFingerprintCa

#endif

#endif

0 comments on commit 56b088f

Please sign in to comment.