Open Reality Reference Guide
fbconsole.h
Go to the documentation of this file.
1 #ifndef __FBCONSOLE_H__
2 #define __FBCONSOLE_H__
3 /**************************************************************************
4  Copyright (c) 1994 - 2009 Autodesk, Inc. and/or its licensors.
5  All Rights Reserved.
6 
7  The coded instructions, statements, computer programs, and/or related
8  material (collectively the "Data") in these files contain unpublished
9  information proprietary to Autodesk, Inc. and/or its licensors, which is
10  protected by Canada and United States of America federal copyright law
11  and by international treaties.
12 
13  The Data may not be disclosed or distributed to third parties, in whole
14  or in part, without the prior written consent of Autodesk, Inc.
15  ("Autodesk").
16 
17  THE DATA IS PROVIDED "AS IS" AND WITHOUT WARRANTY.
18  ALL WARRANTIES ARE EXPRESSLY EXCLUDED AND DISCLAIMED. AUTODESK MAKES NO
19  WARRANTY OF ANY KIND WITH RESPECT TO THE DATA, EXPRESS, IMPLIED OR
20  ARISING BY CUSTOM OR TRADE USAGE, AND DISCLAIMS ANY IMPLIED WARRANTIES
21  OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR
22  PURPOSE OR USE. WITHOUT LIMITING THE FOREGOING, AUTODESK DOES NOT
23  WARRANT THAT THE OPERATION OF THE DATA WILL BE UNINTERRUPTED OR ERROR
24  FREE.
25 
26  IN NO EVENT SHALL AUTODESK, ITS AFFILIATES, PARENT COMPANIES, LICENSORS
27  OR SUPPLIERS ("AUTODESK GROUP") BE LIABLE FOR ANY LOSSES, DAMAGES OR
28  EXPENSES OF ANY KIND (INCLUDING WITHOUT LIMITATION PUNITIVE OR MULTIPLE
29  DAMAGES OR OTHER SPECIAL, DIRECT, INDIRECT, EXEMPLARY, INCIDENTAL, LOSS
30  OF PROFITS, REVENUE OR DATA, COST OF COVER OR CONSEQUENTIAL LOSSES OR
31  DAMAGES OF ANY KIND), HOWEVER CAUSED, AND REGARDLESS OF THE THEORY OF
32  LIABILITY, WHETHER DERIVED FROM CONTRACT, TORT (INCLUDING, BUT NOT
33  LIMITED TO, NEGLIGENCE), OR OTHERWISE, ARISING OUT OF OR RELATING TO THE
34  DATA OR ITS USE OR ANY OTHER PERFORMANCE, WHETHER OR NOT AUTODESK HAS
35  BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
36 
37 **************************************************************************/
38 
44 #include <kaydaradef.h>
45 #ifndef FBSDK_DLL
49  #define FBSDK_DLL K_DLLIMPORT
50 #endif
51 
52 #include <fbsdk/fbcomponent.h>
53 
54 #ifdef FBSDKUseNamespace
55  namespace FBSDKNamespace {
56 #endif
57 
68 };
69 FB_DEFINE_ENUM( FBSDK_DLL, ConsoleChannelType );
70 
72 
76 public:
80  FBConsoleChannel(const char *pName);
81 
82  //--- Properties ---
86  FBPropertyConsoleChannelType Type;
91 };
92 FB_DEFINE_ARRAY ( FBSDK_DLL, ConsoleChannel );
93 
95 // FBPropertyListConsoleChannel
97 
99 class FBSDK_DLL FBPropertyListConsoleChannel : public FBPropertyBaseList< FBConsoleChannel* >
100 {
101 private:
103 
108  virtual int Add ( FBConsoleChannel* pItem );
109 
110 public:
114  virtual void RemoveAt( int pIndex );
115 
121  virtual FBConsoleChannel* operator[](int pIndex);
122 
126  virtual int GetCount();
127 
128 public:
134  virtual int Add ( const char *pName );
135 
141  FBConsoleChannel* Find(const char *pName);
142 };
143 
144 /*-------------------------------------------------------------------------
145  Class FBConsole: Console base class
146  -------------------------------------------------------------------------*/
149 
154  private:
155 
156  public:
161  FBConsole(const char *pName=NULL, HIObject pObject=NULL);
162 
165 
167 
172  virtual bool FbxStore(FBFbxObject* pFbxObject,kFbxObjectStore pStoreWhat);
173  virtual bool FbxRetrieve(FBFbxObject* pFbxObject,kFbxObjectStore pStoreWhat);
175 
176  // Re-implemented from FBComponent.
177  virtual bool FBCreate() override;
178  virtual void FBDestroy() override;
179 
183  virtual bool Open() = 0;
184 
188  virtual bool Close() = 0;
189 
193  virtual bool Initialize() = 0;
194 
198  virtual bool FetchData() = 0;
199 };
203 #define IJLCooper_Declare(IsPure)\
204  public:\
205  /* LCD screen */ \
206  \
207  virtual void LCDClearScreen ( ) IsPure;\
208  \
209  virtual void LCDSendString ( const char* pMessage, int pX = 0, int pY = 0 )IsPure;\
210  \
211  virtual void LCDSendChar ( char pChar, int pX = 0, int pY = 0 ) IsPure;\
212  \
213  virtual void LCDSetCursorBlink ( bool pState = true ) IsPure;\
214  /* TimeCode */ \
215  \
216  virtual void TCSetTime ( FBTime pTime ) IsPure;\
217 
218 
219 K_INTERFACE( IJLCooper, 100103033 );
220 
222 
226 class FBSDK_DLL FBJLCooper : public FBComponent, public IJLCooper
227 {
228  private:
230  public:
234  FBJLCooper ( int pIndex = 0 );
235 
236  IJLCooper_Declare ( override );
237  IObject_Declare ( override );
238 };
239 
240 
241 #ifdef FBSDKUseNamespace
242 }
243 #endif
244 #endif
MotionBuilder SDK base class.
Definition: fbcomponent.h:651
Console data channel.
Definition: fbconsole.h:74
FBPropertyDouble Min
Property: Minimum value.
Definition: fbconsole.h:88
FBPropertyString Name
Property: Name of channel.
Definition: fbconsole.h:83
FBPropertyDouble Max
Property: Maximum value.
Definition: fbconsole.h:89
FBPropertyConsoleChannelType Type
Property: Type of channel.
Definition: fbconsole.h:86
FBPropertyString Description
Property: Description of channel.
Definition: fbconsole.h:84
FBPropertyDouble Step
Property: Stepping value of channel.
Definition: fbconsole.h:90
FBPropertyString Group
Property: Group that channel is part of.
Definition: fbconsole.h:85
FBConsoleChannel(const char *pName)
Constructor.
FBPropertyDouble Value
Property: Current value of channel.
Definition: fbconsole.h:87
Console base class.
Definition: fbconsole.h:152
virtual bool FbxStore(FBFbxObject *pFbxObject, kFbxObjectStore pStoreWhat)
Store/Retrieve data to/from FBX files.
virtual bool Open()=0
Open console.
virtual void FBDestroy() override
Open Reality destruction function.
FBPropertyListConsoleChannel Channels
List: Data Channels.
Definition: fbconsole.h:163
virtual bool Close()=0
Close console.
FBPropertyBool IsTransportControl
Property: Is the console able to interface transport controls (true/false)?
Definition: fbconsole.h:164
virtual bool Initialize()=0
Initialize console.
FBConsole(const char *pName=NULL, HIObject pObject=NULL)
Constructor.
virtual bool FBCreate() override
Open Reality Creation function.
virtual bool FetchData()=0
Fetch data from console.
FBX file interface.
Definition: fbfbx.h:80
JL Cooper interface class.
Definition: fbconsole.h:227
FBJLCooper(int pIndex=0)
Constructor.
PropertyList: Data Channels.
Definition: fbconsole.h:100
virtual void RemoveAt(int pIndex)
Remove a data channel at pIndex.
virtual FBConsoleChannel * operator[](int pIndex)
Overloaded [] operator.
FBConsoleChannel * Find(const char *pName)
Find a channel by name.
virtual int GetCount()
Get channel count.
virtual int Add(const char *pName)
Add a channel by name.
Property class: const char * (String).
#define FB_DEFINE_ARRAY(DllTag, Type)
Define an array (template) for a component (discard the FB..).
Definition: fbarray.h:360
Basic class definitions.
#define __FBClassDeclare(Name, Parent)
For internal use only.
Definition: fbcomponent.h:131
#define FBSDK_DLL
Be sure that FBSDK_DLL is defined only once...
Definition: fbconsole.h:49
#define IJLCooper_Declare(IsPure)
LCD screen related function.
Definition: fbconsole.h:203
FBConsoleChannelType
Console channel types.
Definition: fbconsole.h:59
@ kFBConsoleButton
Button.
Definition: fbconsole.h:61
@ kFBConsoleSlider
Slider.
Definition: fbconsole.h:62
@ kFBConsoleJoystick
Joystick.
Definition: fbconsole.h:67
@ kFBConsoleEncoder
Generic encoder.
Definition: fbconsole.h:64
@ kFBConsoleTransport
Transport.
Definition: fbconsole.h:63
@ kFBConsoleDisplay
Display.
Definition: fbconsole.h:66
@ kFBConsoleNull
Generic type.
Definition: fbconsole.h:60
@ kFBConsoleKey
Key.
Definition: fbconsole.h:65
class K_DLLIMPORT FBPropertyBase< bool, kFBPT_bool > FBPropertyBool
Property: bool
#define FB_DEFINE_ENUM(DllTag, Type)
Define an enum and give it the ability to be a property.
Definition: fbproperties.h:150
class K_DLLIMPORT FBPropertyBase< double, kFBPT_double > FBPropertyDouble
Property: double
kFbxObjectStore
Description of the different store/retrieve passes of the FBX format.
Definition: fbtypes.h:74
#define FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:62
#define __FB_FORWARD(ClassName)
Forwarding of class and typedef declaration.
Definition: fbtypes.h:68