📄 aircraft.cpp
字号:
/*****************************************************************************
Rhapsody : 2.0
Login : bpd
Configuration : DefaultConfig
Model Element : Aircraft_Management_Domain::aircraft
Generated Date : Sun, 13, Sep 98
File Path : DefaultConfig\aircraft.cpp
*****************************************************************************/
//## package Aircraft_Management_Domain
//## class aircraft
#include "aircraft.h"
#include "separationDistance.h"
#include "position.h"
#include "flightPlan.h"
#include "featureMap.h"
#include "equipage.h"
//----------------------------------------------------------------------------
// aircraft.cpp
//----------------------------------------------------------------------------
aircraft::aircraft() {
};
aircraft::~aircraft() {
cleanUpRelations();
};
int aircraft::getTurnRate() const {
return turnRate;
};
void aircraft::setTurnRate(int p_turnRate) {
turnRate = p_turnRate;
};
int aircraft::getSpeed() const {
return speed;
};
void aircraft::setSpeed(int p_speed) {
speed = p_speed;
};
int aircraft::getCallSign() const {
return callSign;
};
void aircraft::setCallSign(int p_callSign) {
callSign = p_callSign;
};
int aircraft::getWeightClass() const {
return weightClass;
};
void aircraft::setWeightClass(int p_weightClass) {
weightClass = p_weightClass;
};
int aircraft::getPropulsionType() const {
return propulsionType;
};
void aircraft::setPropulsionType(int p_propulsionType) {
propulsionType = p_propulsionType;
};
int aircraft::getHeading() const {
return heading;
};
void aircraft::setHeading(int p_heading) {
heading = p_heading;
};
OMIterator<flightPlan*> aircraft::getItsFlightPlan() const {
OMIterator<flightPlan*> iter(itsFlightPlan);iter.reset();
return iter;
};
void aircraft::_addItsFlightPlan(flightPlan* p_flightPlan) {
itsFlightPlan.add(p_flightPlan);
};
void aircraft::addItsFlightPlan(flightPlan* p_flightPlan) {
if(p_flightPlan != NULL)
p_flightPlan->_addItsAircraft(this);
_addItsFlightPlan(p_flightPlan);
};
void aircraft::_removeItsFlightPlan(flightPlan* p_flightPlan) {
itsFlightPlan.remove(p_flightPlan);
};
void aircraft::removeItsFlightPlan(flightPlan* p_flightPlan) {
if(p_flightPlan != NULL)
p_flightPlan->_removeItsAircraft(this);
_removeItsFlightPlan(p_flightPlan);
};
void aircraft::_clearItsFlightPlan() {
itsFlightPlan.removeAll();
};
void aircraft::clearItsFlightPlan() {
OMIterator<flightPlan*> iter(itsFlightPlan);iter.reset();
while(*iter)
{
flightPlan* current = *iter;
if(current)
current->_removeItsAircraft(this);
iter++;
};
_clearItsFlightPlan();
};
OMIterator<equipage*> aircraft::getItsEquipage() const {
OMIterator<equipage*> iter(itsEquipage);iter.reset();
return iter;
};
void aircraft::_addItsEquipage(equipage* p_equipage) {
itsEquipage.add(p_equipage);
};
void aircraft::addItsEquipage(equipage* p_equipage) {
if(p_equipage != NULL)
p_equipage->_addItsAircraft(this);
_addItsEquipage(p_equipage);
};
void aircraft::_removeItsEquipage(equipage* p_equipage) {
itsEquipage.remove(p_equipage);
};
void aircraft::removeItsEquipage(equipage* p_equipage) {
if(p_equipage != NULL)
p_equipage->_removeItsAircraft(this);
_removeItsEquipage(p_equipage);
};
void aircraft::_clearItsEquipage() {
itsEquipage.removeAll();
};
void aircraft::clearItsEquipage() {
OMIterator<equipage*> iter(itsEquipage);iter.reset();
while(*iter)
{
equipage* current = *iter;
if(current)
current->_removeItsAircraft(this);
iter++;
};
_clearItsEquipage();
};
OMIterator<position*> aircraft::getItsPosition() const {
OMIterator<position*> iter(itsPosition);iter.reset();
return iter;
};
void aircraft::_addItsPosition(position* p_position) {
itsPosition.add(p_position);
};
void aircraft::addItsPosition(position* p_position) {
if(p_position != NULL)
p_position->_addItsAircraft(this);
_addItsPosition(p_position);
};
void aircraft::_removeItsPosition(position* p_position) {
itsPosition.remove(p_position);
};
void aircraft::removeItsPosition(position* p_position) {
if(p_position != NULL)
p_position->_removeItsAircraft(this);
_removeItsPosition(p_position);
};
void aircraft::_clearItsPosition() {
itsPosition.removeAll();
};
void aircraft::clearItsPosition() {
OMIterator<position*> iter(itsPosition);iter.reset();
while(*iter)
{
position* current = *iter;
if(current)
current->_removeItsAircraft(this);
iter++;
};
_clearItsPosition();
};
void aircraft::cleanUpRelations() {
{
OMIterator<flightPlan*> iter(itsFlightPlan);iter.reset();
while(*iter)
{
flightPlan* current = *iter;
if(current)
current->_removeItsAircraft(this);
iter++;
};
itsFlightPlan.removeAll();
}
{
OMIterator<equipage*> iter(itsEquipage);iter.reset();
while(*iter)
{
equipage* current = *iter;
if(current)
current->_removeItsAircraft(this);
iter++;
};
itsEquipage.removeAll();
}
{
OMIterator<position*> iter(itsPosition);iter.reset();
while(*iter)
{
position* current = *iter;
if(current)
current->_removeItsAircraft(this);
iter++;
};
itsPosition.removeAll();
}
};
/*****************************************************************************
File Path : DefaultConfig\aircraft.cpp
*****************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -