internal void RemoveNodeParameter(NodeParameter nodeParameter) { m_nodeParameters.Remove(nodeParameter); if (m_nodeParameters.Count == 0) { m_nodeParameters = null; } }
internal void AddNodeParameter(NodeParameter nodeParameter) { Debug.Assert(!(nodeParameter is null)); if (m_nodeParameters is null) { m_nodeParameters = new List <NodeParameter>(); } m_nodeParameters.Add(nodeParameter); }
internal void AddListener(NodeParameter listener) { Debug.Assert(listener is not null); Debug.Assert(!ContainsListener(listener)); if (m_listeners is null) { m_listeners = new List <ObjectRef <NodeParameter> >(); } m_listeners.Add(new ObjectRef <NodeParameter>(listener)); }
internal void RemoveListener(NodeParameter listener) { Debug.Assert(ContainsListener(listener)); for (int i = 0; i < m_listeners.Count; ++i) { if (m_listeners[i].Object == listener) { m_listeners.RemoveAt(i); break; } } if (m_listeners.Count == 0) { m_listeners = null; } }
internal bool ContainsListener(NodeParameter listener) { if (m_listeners is null) { return(false); } else { foreach (var l in m_listeners) { if (l.Object == listener) { return(true); } } return(false); } }
public abstract bool Accepts(NodeParameter parameter);