/// <summary>
        /// Determines if a particular output slot of another module can link to this slot
        /// </summary>
        /// <param name="source">the slot of the other module that'd like to link to this input slot</param>
        /// <returns>whether linking is allowed or not</returns>
        /// <remarks>By default it checks against datatype, MaxInput and self reference</remarks>
        public virtual bool IsValidTarget(CGModuleOutputSlot source)
        {
            var myInfo = InputInfo;

            return(source.Module != Module &&
                   myInfo.IsValidFrom(source.OutputInfo.DataType) &&
                   ((source.OnRequestModule != null && (myInfo.RequestDataOnly || OnRequestModule != null)) || (source.OnRequestModule == null && !myInfo.RequestDataOnly))
                   );
        }
Beispiel #2
0
 public void setINTERNAL(CurvyGenerator generator, string moduleName, string slotName)
 {
     m_Module   = generator.GetModule(moduleName);
     m_SlotName = slotName;
     mSlot      = null;
 }
Beispiel #3
0
        /*! \cond PRIVATE */

        public void setINTERNAL(CGModule module, string slotName)
        {
            m_Module   = module;
            m_SlotName = slotName;
            mSlot      = null;
        }
Beispiel #4
0
 public CGModuleLink GetInputLink(CGModuleInputSlot inSlot, CGModuleOutputSlot outSlot)
 {
     return(GetLink(InputLinks, inSlot, outSlot));
 }
Beispiel #5
0
 public List <CGModuleLink> GetOutputLinks(CGModuleOutputSlot outSlot)
 {
     return(GetLinks(OutputLinks, outSlot));
 }