IPFArrow.h

Go to the documentation of this file.
00001 
00006 /**********************************************************************
00007  *<
00008     CREATED BY: Oleg Bayborodin
00009 
00010     HISTORY: created 10-15-01
00011 
00012  *> Copyright (c) 2001, All Rights Reserved.
00013  **********************************************************************/
00014 
00015 #pragma once
00016 
00017 #include "PFExport.h"
00018 #include "..\ifnpub.h"
00019 #include "..\object.h"
00020 
00021 PFExport Object* GetPFObject(Object* obj);
00022 // interface ID
00023 #define PFARROW_INTERFACE Interface_ID(0x74f93d05, 0x1eb34500) 
00024 #define GetPFArrowInterface(obj) ((IPFArrow*)(GetPFObject(obj))->GetInterface(PFARROW_INTERFACE)) 
00025 
00026 
00027 class IPFArrow : public FPMixinInterface
00028 {
00029 public:
00030 
00031     // function IDs
00032     enum {  kSetTest,
00033             kSetActionList,
00034             kGetTest,
00035             kGetActionList,
00036             kActivate,
00037             kDeactivate,
00038             kIsActive
00039     }; 
00040 
00041     // Function Map for Function Publish System 
00042     //***********************************
00043     BEGIN_FUNCTION_MAP
00044 
00045     FN_1(kSetTest, TYPE_bool, SetTest, TYPE_INODE);
00046     FN_1(kSetActionList, TYPE_bool, SetActionList, TYPE_INODE);
00047     FN_0(kGetTest, TYPE_INODE, GetTest);
00048     FN_0(kGetActionList, TYPE_INODE, GetActionList);
00049     FN_0(kActivate, TYPE_bool, Activate);
00050     FN_0(kDeactivate, TYPE_bool, Deactivate);
00051     FN_0(kIsActive, TYPE_bool, IsActive);
00052 
00053     END_FUNCTION_MAP
00054 
00064     virtual bool SetTest(INode* test) = 0;
00065 
00071     virtual bool SetActionList(INode* actionList) = 0;
00072 
00076     virtual INode* GetTest() const = 0;
00077 
00081     virtual INode* GetActionList() const = 0;
00082 
00086     virtual bool Activate() = 0;
00087 
00091     virtual bool Deactivate() = 0;
00092 
00096     virtual bool IsActive() const = 0;
00097 
00101     FPInterfaceDesc* GetDesc() { return GetDescByID(PFARROW_INTERFACE); }
00102 
00106     PFExport void updateNextActionListValueInTestFrom(INode* nextAL, INode* testFrom);
00107 
00111     PFExport void updateArrowValueInTestFrom(Object* arrow, INode* testFrom);
00112 
00116     PFExport void updateLinkActiveValueInTestFrom(bool active, INode* testFrom);
00117 };
00118 
00119 inline IPFArrow* PFArrowInterface(Object* obj) {
00120     return ((obj == NULL) ? NULL : GetPFArrowInterface(obj));
00121 };
00122 
00123 inline IPFArrow* PFArrowInterface(INode* node) {
00124     return ((node == NULL) ? NULL : PFArrowInterface(node->GetObjectRef()));
00125 };
00126