VoyForums
[ Show ]
Support VoyForums
[ Shrink ]
VoyForums Announcement: Programming and providing support for this service has been a labor of love since 1997. We are one of the few services online who values our users' privacy, and have never sold your information. We have even fought hard to defend your privacy in legal cases; however, we've done it with almost no financial support -- paying out of pocket to continue providing the service. Due to the issues imposed on us by advertisers, we also stopped hosting most ads on the forums many years ago. We hope you appreciate our efforts.

Show your support by donating any amount. (Note: We are still technically a for-profit company, so your contribution is not tax-deductible.) PayPal Acct: Feedback:

Donate to VoyForums (PayPal):

Login ] [ Main index ] [ Post a new message ] [ Search | Check update time | Archives: 1[2] ]
Subject: test


Author:
sdkfka
[ Next Thread | Previous Thread | Next Message | Previous Message ]
Date Posted: 12:19:32 07/29/01 Sun

/*********************************************
* Naval Battle Simulation System
*
* Abstract Base Class For All Vehicle Team
*
* by Simulation Controller Team
*
* July 2001
*
* baseclass.h
*********************************************/



#include "Vector.h"

#ifndef _NBSS_BASECLASS_H_
#define _NBSS_BASECLASS_H_

class baseClass
{
protected:
int ID;
int check;

public:
virtual Vector getPosition() = 0;
virtual void updatePosition() = 0;
virtual bool isActive() = 0;
virtual void execute(double) = 0;
virtual int getType() = 0;
virtual char getFlag() = 0;

void setID(int id)
{
ID = id;
}

int getID()
{
return ID;
}

void setCheck(int ck)
{
check = ck;
}

int getCheck()
{
return check;
}

virtual ~baseClass(){}
};

#endif


Notes:

There are two minor changes in the base class:

1)Argument type in execute() function is changed from int to double.

2)One attribute, "check", and two other functions, setCheck() , getCheck, are added for contingency. It will not affect the derived classes.

[ Next Thread | Previous Thread | Next Message | Previous Message ]



Forum timezone: GMT-8
VF Version: 3.00b, ConfDB:
Before posting please read our privacy policy.
VoyForums(tm) is a Free Service from Voyager Info-Systems.
Copyright © 1998-2019 Voyager Info-Systems. All Rights Reserved.