Documentation, header guards

This commit is contained in:
robojumper
2024-06-01 23:57:11 +02:00
parent 374e93821e
commit 8ecaacda93
14 changed files with 65 additions and 14 deletions
+2 -1
View File
@@ -5,7 +5,8 @@ with differences/modifications outlined below:
The NSMBW code uses inlined destructors. In SS, these destructors are all part of the s_StateID.cpp(?) TU,
and pretty much every generic instantiation of the state manager (which for a large part are in RELs)
will call back into those destructors in the main DOL.
will call back into those destructors in the main DOL. As a result, the destructors were made not inline
and explicitly instantiated in s_StateID.cpp
## s_StateIDChk.hpp
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_DOCGROUP_H
#define S_DOCGROUP_H
// [This header file defines documentation groups for better categorization]
/// @ingroup game
@@ -8,3 +10,5 @@
/// @defgroup state sState
/// @ingroup slib
/// @brief A state system implementation.
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_FSTATE_H
#define S_FSTATE_H
#include <s/s_StateInterfaces.hpp>
#include <s/s_FStateID.hpp>
@@ -42,3 +44,5 @@ private:
T &mpOwner; ///< The owner of this state.
const sFStateID_c<T> *mpID; ///< The state ID that runs the state methods.
};
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_FSTATEFCT_H
#define S_FSTATEFCT_H
#include <s/s_StateInterfaces.hpp>
#include <s/s_FState.hpp>
#include <s/s_StateID.hpp>
@@ -27,3 +29,5 @@ public:
private:
sFState_c<T> mState;
};
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_FSTATEID_H
#define S_FSTATEID_H
#include <s/s_StateID.hpp>
#include <MSL_C/string.h>
@@ -59,3 +61,5 @@ private:
stateFunc mpExecute; ///< The execute method for this state ID.
stateFunc mpFinalize; ///< The finalize method for this state ID.
};
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_FSTATEMGR_H
#define S_FSTATEMGR_H
#include <s/s_FStateID.hpp>
#include <s/s_StateMgr.hpp>
#include <s/s_FState.hpp>
@@ -18,3 +20,5 @@ public:
sFStateMgr_c(T &owner, const sStateIDIf_c &initializeState) :
sStateMgr_c<T, Method, sFStateFct_c, sStateIDChk_c>(owner, initializeState) {}
};
#endif
+4 -1
View File
@@ -1,4 +1,5 @@
#pragma once
#ifndef S_PHASE_H
#define S_PHASE_H
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
@@ -35,3 +36,5 @@ public:
unsigned short mPhaseLength; ///< The length of the method list.
unsigned short mCurrMethod; ///< The index of the method to execute.
};
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_STATE_H
#define S_STATE_H
#include <s/s_FStateMgr.hpp>
#include <s/s_StateMethodUsr_FI.hpp>
@@ -15,3 +17,5 @@
&class::initializeState_##name, \
&class::executeState_##name, \
&class::finalizeState_##name)
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_STATEID_H
#define S_STATEID_H
#include <s/s_StateInterfaces.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
@@ -44,3 +46,5 @@ namespace sStateID {
/// @ingroup state
extern sStateID_c null; ///< A null state instance.
}
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_STATEIDCHK_H
#define S_STATEIDCHK_H
#include <s/s_StateInterfaces.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
@@ -11,3 +13,5 @@ public:
virtual ~sStateIDChk_c();
virtual bool isNormalID(const sStateIDIf_c &) const { return true; }
};
#endif
+4 -1
View File
@@ -1,4 +1,5 @@
#pragma once
#ifndef S_STATEINTERFACES_H
#define S_STATEINTERFACES_H
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
// See include/s/README.txt for changes made
@@ -74,3 +75,5 @@ public:
};
/// @}
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_STATEMETHOD_H
#define S_STATEMETHOD_H
#include <s/s_StateInterfaces.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
@@ -50,3 +52,5 @@ protected:
sStateIf_c *mpState; ///< The current state holder.
};
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_STATEMETHODUSR_FI_H
#define S_STATEMETHODUSR_FI_H
#include <s/s_StateMethod.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
@@ -17,3 +19,5 @@ public:
virtual void finalizeStateLocalMethod();
virtual void changeStateLocalMethod(const sStateIDIf_c &newStateID);
};
#endif
+5 -1
View File
@@ -1,4 +1,6 @@
#pragma once
#ifndef S_STATEMGR_H
#define S_STATEMGR_H
#include <s/s_StateInterfaces.hpp>
// Note: Ported from https://github.com/NSMBW-Community/NSMBW-Decomp/tree/master/include/dol/sLib
@@ -38,3 +40,5 @@ private:
Factory<T> mFactory;
Method mMethod;
};
#endif