hopefully this fixes circular includes

This commit is contained in:
Robin Müller 2021-01-12 19:41:47 +01:00
parent 3242264a77
commit 71a12792a9
7 changed files with 39 additions and 27 deletions

View File

@ -1,19 +1,9 @@
#ifndef FSFW_DATAPOOLLOCAL_HASLOCALDATAPOOLIFATTORNEY_H_
#define FSFW_DATAPOOLLOCAL_HASLOCALDATAPOOLIFATTORNEY_H_
#ifndef FSFW_DATAPOOLLOCAL_HASLOCALDPIFMANAGERATTORNEY_H_
#define FSFW_DATAPOOLLOCAL_HASLOCALDPIFMANAGERATTORNEY_H_
#include <fsfw/datapoollocal/LocalDataPoolManager.h>
#include "HasLocalDataPoolIF.h"
class HasLocalDpIFUserAttorney {
private:
static AccessPoolManagerIF* getAccessorHandle(HasLocalDataPoolIF* interface) {
return interface->getAccessorHandle();
}
friend class LocalPoolObjectBase;
friend class LocalPoolDataSetBase;
};
class LocalPoolDataSetBase;
class HasLocalDpIFManagerAttorney {
@ -33,6 +23,4 @@ class HasLocalDpIFManagerAttorney {
friend class LocalDataPoolManager;
};
#endif /* FSFW_DATAPOOLLOCAL_HASLOCALDATAPOOLIFATTORNEY_H_ */
#endif /* FSFW_DATAPOOLLOCAL_HASLOCALDPIFMANAGERATTORNEY_H_ */

View File

@ -0,0 +1,20 @@
#ifndef FSFW_DATAPOOLLOCAL_HASLOCALDPIFUSERATTORNEY_H_
#define FSFW_DATAPOOLLOCAL_HASLOCALDPIFUSERATTORNEY_H_
class AccessPoolManagerIF;
class HasLocalDataPoolIF;
class HasLocalDpIFUserAttorney {
private:
static AccessPoolManagerIF* getAccessorHandle(HasLocalDataPoolIF* interface) {
return interface->getAccessorHandle();
}
friend class LocalPoolObjectBase;
friend class LocalPoolDataSetBase;
};
#endif /* FSFW_DATAPOOLLOCAL_HASLOCALDPIFUSERATTORNEY_H_ */

View File

@ -1,7 +1,7 @@
#include <fsfw/datapoollocal/HasLocalDpIFManagerAttorney.h>
#include "LocalDataPoolManager.h"
#include "LocalPoolObjectBase.h"
#include "LocalPoolDataSetBase.h"
#include "HasLocalDataPoolIFAttorney.h"
#include "LocalPoolDataSetAttorney.h"
#include "../housekeeping/HousekeepingPacketUpdate.h"

View File

@ -1,5 +1,6 @@
#include "LocalPoolDataSetBase.h"
#include "HasLocalDataPoolIFAttorney.h"
#include "HasLocalDataPoolIF.h"
#include "HasLocalDpIFUserAttorney.h"
#include "../serviceinterface/ServiceInterface.h"
#include "../datapoollocal/LocalDataPoolManager.h"
@ -50,9 +51,6 @@ LocalPoolDataSetBase::LocalPoolDataSetBase(sid_t sid,
mutexIfSingleDataCreator = hkOwner->getLocalPoolMutex();
}
//if(hkManager != nullptr) {
// mutexIfSingleDataCreator = hkManager->getMutexHandle();
//}
this->sid = sid;
}

View File

@ -1,15 +1,16 @@
#ifndef FSFW_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_
#define FSFW_DATAPOOLLOCAL_LOCALPOOLDATASETBASE_H_
#include "HasLocalDataPoolIF.h"
#include "MarkChangedIF.h"
#include "../datapoollocal/locPoolDefinitions.h"
#include "../datapool/DataSetIF.h"
#include "../datapool/PoolDataSetBase.h"
#include <vector>
class LocalDataPoolManager;
class HasLocalDataPoolIF;
class PeriodicHousekeepingHelper;
/**
@ -42,7 +43,6 @@ class PeriodicHousekeepingHelper;
*/
class LocalPoolDataSetBase: public PoolDataSetBase,
public MarkChangedIF {
//friend class LocalDataPoolManager;
friend class LocalPoolDataSetAttorney;
friend class PeriodicHousekeepingHelper;
public:

View File

@ -1,5 +1,6 @@
#include "LocalDataPoolManager.h"
#include "LocalPoolObjectBase.h"
#include "HasLocalDataPoolIFAttorney.h"
#include "HasLocalDpIFUserAttorney.h"
LocalPoolObjectBase::LocalPoolObjectBase(lp_id_t poolId, HasLocalDataPoolIF* hkOwner,
DataSetIF* dataSet, pool_rwm_t setReadWriteMode):
@ -19,7 +20,7 @@ LocalPoolObjectBase::LocalPoolObjectBase(lp_id_t poolId, HasLocalDataPoolIF* hkO
}
AccessPoolManagerIF* poolManAccessor = HasLocalDpIFUserAttorney::getAccessorHandle(hkOwner);
hkManager = poolManAccessor->getHkManagerHandle();
//HasLohkOwner->getHkManagerHandle();
if (dataSet != nullptr) {
dataSet->registerVariable(this);
}

View File

@ -2,9 +2,14 @@
#define FSFW_DATAPOOLLOCAL_LOCALPOOLOBJECTBASE_H_
#include "MarkChangedIF.h"
#include "../datapoollocal/LocalDataPoolManager.h"
#include "../datapoollocal/locPoolDefinitions.h"
#include "../objectmanager/SystemObjectIF.h"
#include "../datapool/PoolVariableIF.h"
#include "../returnvalues/HasReturnvaluesIF.h"
class LocalDataPoolManager;
class DataSetIF;
class HasLocalDataPoolIF;
class LocalPoolObjectBase: public PoolVariableIF,
public HasReturnvaluesIF,