home *** CD-ROM | disk | FTP | other *** search
- /****
- * CNDCamera.h
- *
- * Persistent camera class.
- *
- * Copyright © 1992 NeoLogic Systems. All rights reserved.
- *
- ****/
-
- #pragma once /* Include this file only once */
-
- #include CNeoPersistNativeH
-
- class CNDCamera;
-
- enum {
- typeNeoCamera = 'Ncmr'
- };
-
- #define cCamera 'cmra'
- #define kNDCameraID 20
- #define kShutterMax 10 /* max number of shutter speeds a camera object can have */
- #define kMaxCameras 10
-
- class CNDCamera : public CNeoPersistNative {
- public:
- /** Instance Methods **/
- CNDCamera(const CNeoString &aName, const short aShutterCnt, const short *aSpeeds);
- static CNeoPersist *New(void);
- virtual NeoID getClassID(void) const;
- virtual long getLength(void) const;
- virtual long getFileLength(void) const;
-
- /** I/O Methods **/
- virtual void readObject(CNeoStream *aStream, const NeoTag aTag);
- virtual void writeObject(CNeoStream *aStream, const NeoTag aTag);
-
- /** Search Methods **/
- static CNDCamera * FindByName(CNeoDatabase *aDataBase, const CNeoString &aName);
-
- /** Camera Methods **/
- short addShutterSpeed(const short aSpeed);
- static void ClearCameraTable(void);
- void deleteShutterSpeed(const short aIndex);
- static NeoID GetCameraID(const short aIndex);
- void getName(CNeoString &aName);
- short getShutterCount(void);
- short getShutter(const short aIndex);
- static void * MakeCameraMenu(CNeoNode *aNode, const short aIndex, const NeoLockType aLock, void *aParam);
- void setName(const CNeoString &aName);
-
- static short FCameraCnt;
- static NeoID FCamMenu2IDTable[kMaxCameras];
-
- protected:
- /** Instance Variables **/
- short fShutterCount; /* number of actual shutter speeds that camera has */
- short fShutters[kShutterMax]; /* holds shutter speeds of this camera */
- CNeoString fName;
- };
-
- #define pCameraShutters 'CMsh'
- #define pShutterCount 'CMsc'
-
-