xsi_operator.h
Go to the documentation of this file.
00001 //*****************************************************************************
00011 //*****************************************************************************
00012 
00013 #if (_MSC_VER > 1000) || defined(SGI_COMPILER)
00014 #pragma once
00015 #endif
00016 
00017 #ifndef __XSIOPERATOR_H__
00018 #define __XSIOPERATOR_H__
00019 
00020 #include <xsi_projectitem.h>
00021 
00022 namespace XSI {
00023 
00024 class Port;
00025 
00026 //*****************************************************************************
00169 //*****************************************************************************
00170 
00171 class SICPPSDKDECL Operator : public ProjectItem
00172 {
00173 public:
00175     Operator();
00176 
00178     ~Operator();
00179 
00183     Operator(const CRef& in_ref);
00184 
00188     Operator(const Operator& in_obj);
00189 
00194     bool IsA( siClassID in_ClassID) const;
00195 
00199     siClassID GetClassID() const;
00200 
00206     Operator& operator=(const Operator& in_obj);
00207 
00213     Operator& operator=(const CRef& in_ref);
00214 
00222     Port GetPort
00223     (
00224         const CString& in_portname,
00225         const CString& in_groupname,
00226         LONG in_instance = 0
00227     ) const;
00228 
00239     Port GetPortAt
00240     (
00241         LONG in_port,
00242         LONG in_group = 0,
00243         LONG in_instance = 0
00244     ) const;
00245 
00249     CRefArray GetInputPorts() const;
00250 
00255     CRefArray GetOutputPorts() const;
00256 
00261     LONG GetNumPortGroups() const;
00262 
00268     LONG GetNumPortsInGroup(LONG in_index) const;
00269 
00275     LONG GetNumInstancesInGroup(LONG in_index) const;
00276 
00281     bool GetMute(void) const;
00282 
00290     CStatus PutMute(bool in_mute);
00291 
00300     CStatus Disconnect(bool in_force);
00301 
00311     CStatus Connect(siConstructionMode in_mode = siConstructionModeDefault);
00312 
00322     CStatus Connect(const CRef& in_obj,siConstructionMode in_mode = siConstructionModeDefault);
00323 
00333     CStatus Connect(const CRefArray& in_objs, siConstructionMode in_mode = siConstructionModeDefault);
00334 
00345     CStatus Connect(const CString& in_objs,siConstructionMode in_mode = siConstructionModeDefault);
00346 
00351     CRefArray GetPortGroups() const;
00352 
00357     bool IsConnected() const;
00358 
00365     bool SupportsBranchGroup(LONG group = -1, LONG port = -1 ) const;
00366 
00378     CStatus ConnectToGroup( LONG in_Group, CRef & in_obj, LONG & out_Instance );
00379 
00387     CStatus DisconnectGroup( LONG in_Group, LONG in_Instance, bool in_Force = false );
00388 
00397     CValue GetInputValue(   LONG in_port,
00398                             LONG in_group = 0,
00399                             LONG in_instance = 0 ) const;
00400 
00409     CValue GetInputValue(   const CString&  in_port,
00410                             const CString&  in_group = CString(),
00411                             LONG            in_instance = 0 ) const;
00412 
00413     private:
00414     Operator * operator&() const;
00415     Operator * operator&();
00416 
00417 };
00418 
00419 };
00420 
00421 #endif // __XSIOPERATOR_H__