fbconsole.h

Go to the documentation of this file.
00001 #ifndef __FBCONSOLE_H__
00002 #define __FBCONSOLE_H__
00003 /**************************************************************************
00004  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
00005  All Rights Reserved.
00006  
00007  The coded instructions, statements, computer programs, and/or related 
00008  material (collectively the "Data") in these files contain unpublished 
00009  information proprietary to Autodesk, Inc. and/or its licensors, which is 
00010  protected by Canada and United States of America federal copyright law 
00011  and by international treaties.
00012  
00013  The Data may not be disclosed or distributed to third parties, in whole 
00014  or in part, without the prior written consent of Autodesk, Inc. 
00015  ("Autodesk").
00016  
00017  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
00018  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO 
00019  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR 
00020  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES 
00021  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR 
00022  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT 
00023  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR 
00024  FREE.
00025  
00026  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS 
00027  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR 
00028  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE 
00029  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS 
00030  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR 
00031  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF 
00032  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT 
00033  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE 
00034  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS 
00035  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
00036  
00037 **************************************************************************/
00038 
00044 #include <kaydaradef.h>
00045 #ifndef FBSDK_DLL 
00046 
00049     #define FBSDK_DLL K_DLLIMPORT
00050 #endif
00051 
00052 #include <fbsdk/fbcomponent.h>
00053 
00054 #ifdef FBSDKUseNamespace
00055     namespace FBSDKNamespace {
00056 #endif
00057 
00059 enum FBConsoleChannelType {
00060     kFBConsoleNull,             
00061     kFBConsoleButton,           
00062     kFBConsoleSlider,           
00063     kFBConsoleTransport,        
00064     kFBConsoleEncoder,          
00065     kFBConsoleKey,              
00066     kFBConsoleDisplay,          
00067     kFBConsoleJoystick          
00068 };
00069 FB_DEFINE_ENUM( FBSDK_DLL, ConsoleChannelType );
00070 
00071 __FB_FORWARD( FBConsoleChannel );
00072 
00074 class FBSDK_DLL FBConsoleChannel : public FBComponent {
00075     __FBClassDeclare( FBConsoleChannel,FBComponent );
00076 public:
00080     FBConsoleChannel(char *pName);
00081 
00082     //--- Properties ---
00083     FBPropertyString                Name;           
00084     FBPropertyString                Description;    
00085     FBPropertyString                Group;          
00086     FBPropertyConsoleChannelType    Type;           
00087     FBPropertyDouble                Value;          
00088     FBPropertyDouble                Min;            
00089     FBPropertyDouble                Max;            
00090     FBPropertyDouble                Step;           
00091 };
00092 FB_DEFINE_ARRAY ( FBSDK_DLL, ConsoleChannel );
00093 
00095 // FBPropertyListConsoleChannel
00097 
00099 class FBSDK_DLL FBPropertyListConsoleChannel : public FBPropertyBaseList< HFBConsoleChannel >
00100 {
00101 private:
00102     FBArrayTemplate<HFBConsoleChannel> mItems;          
00103 
00108     virtual int  Add    ( HFBConsoleChannel pItem );    
00109 
00110 public:
00114     virtual void RemoveAt( int pIndex );                
00115 
00121     virtual HFBConsoleChannel operator[](int pIndex);   
00122 
00126     virtual int  GetCount();                            
00127 
00128 public:
00134     virtual int  Add    ( char *pName );
00135    
00141     HFBConsoleChannel Find(char *pName);
00142 };
00143 
00144 /*-------------------------------------------------------------------------
00145   Class FBConsole: Console base class
00146  -------------------------------------------------------------------------*/
00147 __FB_FORWARD( FBConsole );
00148 FB_FORWARD( FBFbxObject );
00149 
00152 class FBSDK_DLL FBConsole : public FBComponent {
00153     __FBClassDeclare( FBConsole,FBComponent );
00154   private:
00155 
00156   public:
00161     FBConsole(char *pName=NULL, HIObject pObject=NULL);
00162 
00163     FBPropertyListConsoleChannel        Channels;           
00164     FBPropertyBool                      IsTransportControl; 
00165 
00167 
00172     virtual bool FbxStore(HFBFbxObject pFbxObject,kFbxObjectStore pStoreWhat);
00173     virtual bool FbxRetrieve(HFBFbxObject pFbxObject,kFbxObjectStore pStoreWhat);
00175 
00176     // Re-implemented from FBComponent.
00177     virtual bool FBCreate();
00178     virtual void FBDestroy();
00179 
00183     virtual bool Open()         = 0;
00184 
00188     virtual bool Close()        = 0;
00189 
00193     virtual bool Initialize()   = 0;
00194 
00198     virtual bool FetchData()    = 0;
00199 };
00203 #define IJLCooper_Declare(IsPure)\
00204   public:\
00205     /* LCD screen */    \
00206  \
00207     virtual void LCDClearScreen     ( )                                             IsPure \
00208  \
00209     virtual void LCDSendString      ( char* pMessage, int pX = 0, int pY = 0 )  IsPure \
00210  \
00211     virtual void LCDSendChar        ( char pChar, int pX = 0, int pY = 0 )              IsPure \
00212  \
00213     virtual void LCDSetCursorBlink  ( bool pState = true )                          IsPure \
00214     /* TimeCode */  \
00215  \
00216     virtual void TCSetTime          ( FBTime pTime )                                    IsPure \
00217 
00218 
00219 K_INTERFACE( IJLCooper, 100103033 );
00220 
00221 __FB_FORWARD( FBJLCooper );
00222 
00226 class FBSDK_DLL FBJLCooper : public FBComponent
00227 {
00228   private:
00229     __FBClassDeclare( FBJLCooper, FBComponent );
00230   public:
00234     FBJLCooper          ( int pIndex = 0 );
00235 
00236     IJLCooper_Declare   ( Implementation );
00237 };
00238 
00239     
00240 #ifdef FBSDKUseNamespace
00241 }
00242 #endif
00243 #endif