ILimitCtrl.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002 
00003     FILE: ILimitCtrl.h
00004 
00005     DESCRIPTION: Describes all interfaces and constants about the limit 
00006     controllers that the outside world should need to know.
00007 
00008     CREATED BY: Nicolas Leonard
00009 
00010     HISTORY:    November 3rd, 2004  Creation
00011 
00012     Copyright (c) 2004, All Rights Reserved.
00013  *****************************************************************************/
00014 
00015 #pragma once
00016 
00017 #include "iFnPub.h"
00018 #include "Animatable.h"
00019 
00020 /***************************************************************
00021 Function Publishing System   
00022 ****************************************************************/
00023 
00024 #define IID_LIMIT_CONTROL Interface_ID(0xa85724f, 0x75325d35)
00025 
00030 
00044 
00045 class ILimitControl: public FPMixinInterface
00046 {
00047 public:
00048 
00049     // Function Publishing System
00050     enum {
00051         is_enabled,
00052         set_enabled,
00053         get_limited_control,
00054         set_limited_control,
00055         set_upper_limit,
00056         set_lower_limit
00057     };
00058 
00059     // Function Map For Mixin Interface
00061     BEGIN_FUNCTION_MAP
00062         FN_0(is_enabled, TYPE_bool, IsEnabled);
00063         VFN_1(set_enabled, SetEnabled, TYPE_bool);
00064         FN_0(get_limited_control, TYPE_CONTROL, GetLimitedControl);
00065         VFN_1(set_limited_control, SetLimitedControl, TYPE_CONTROL);
00066     END_FUNCTION_MAP
00067 
00068     FPInterfaceDesc* GetDesc(); 
00069 
00071 
00072     virtual bool IsEnabled() const = 0;
00073     virtual void SetEnabled(bool in_enabled) = 0;
00075 
00077 
00078     virtual Control* GetLimitedControl() const = 0;
00079     virtual void SetLimitedControl(Control *in_limitedCtrl) = 0;
00081 
00085     virtual void SetUpperLimit(const TimeValue& in_t, void *in_val) = 0;
00086 
00090     virtual void SetLowerLimit(const TimeValue& in_t, void *in_val) = 0;
00091 
00095     static inline ILimitControl* GetBaseLimitInterface(Animatable* anim) { 
00096         return anim? static_cast<ILimitControl*>(anim->GetInterface(IID_LIMIT_CONTROL)): NULL;}
00097 };
00098