Ejemplo n.º 1
0
 public void pop_list(ref CFastList <_Ty> sList)
 {
     sList.clear();
     lock (this)
     {
         sList.swap(m_List);
     }
 }
Ejemplo n.º 2
0
    public void push_back(_Ty value, int nMaxCount = 0)
    {
        CFastList <_Ty> .CFastListNode node = new CFastList <_Ty> .CFastListNode();

        node.m_value = value;
        lock (this)
        {
            if (nMaxCount <= 0 || m_List.size() < nMaxCount)
            {
                m_List.push_back(node);
            }
        }
    }
Ejemplo n.º 3
0
    public void swap(CFastList <_Ty> other)
    {
        CFastListNode temp = null;

        temp = m_pHeader; m_pHeader = other.m_pHeader; other.m_pHeader = temp;
        temp = m_pEnd; m_pEnd = other.m_pEnd; other.m_pEnd = temp;
        iterator pIt = null;

        pIt = m_pEndItera; m_pEndItera = other.m_pEndItera; other.m_pEndItera = pIt;
        int nTemp = 0;

        nTemp = m_nCount; m_nCount = other.m_nCount; other.m_nCount = nTemp;
    }
Ejemplo n.º 4
0
        public CTableView(int capacity, float width, float height)
            : base(width, height)
        {
            if (capacity < 0)
            {
                throw new ArgumentException("Negative capacity: " + capacity);
            }

            m_reusableCellsLists = new Dictionary <Type, TableViewCellList>();
            m_cellsEntries       = new CCycleArray <CTableViewCellEntry>(capacity);
            m_visibleCells       = new CFastList <CTableViewCell>();

            this.DataSource    = CTableViewNullDataSource.Instance; // don't do null reference checks
            this.SelectionMode = CTableViewSelectionMode.None;

            this.IsMouseEventsEnabled = true;
            this.MouseDown            = MouseDownEventHandler;
            this.MouseDoubleClick     = MouseDoubleClickHandler;

            this.IsFocusable = true;
            this.KeyDown     = KeyDownEventHandler;
            this.KeyUp       = KeyUpEventHandler;
        }