Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / layout / FUi_LayoutLinkedList.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file        FUi_LayoutLinkedList.h
19  * @brief       This is the header file for LinkedList class.
20  *
21  * This header file contains the declaration of LinkedList class.
22  */
23
24 #pragma once
25
26 #ifndef _FUI_INTERNAL_LAYOUT_LINKED_LIST_H_
27 #define _FUI_INTERNAL_LAYOUT_LINKED_LIST_H_
28
29 #include "FUi_LayoutLinkedListNode.h"
30
31 namespace Tizen { namespace Ui { namespace _Layout
32 {
33
34 class LinkedList
35 {
36 public:
37         virtual LinkedListNode* GetFirstNode(void) const;
38         virtual LinkedListNode* GetLastNode(void) const;
39
40         virtual LinkedListNode* GetNextNode(const LinkedListNode& node) const;
41         virtual LinkedListNode* GetPrevNode(const LinkedListNode& node) const;
42
43         result DetachNode(LinkedListNode& node);
44
45         result InsertIntoLeft(LinkedListNode& node, LinkedListNode& leftNode);
46         result InsertIntoRight(LinkedListNode& node, LinkedListNode& rightNode);
47         result SwapNode(LinkedListNode& node1, LinkedListNode& node2);
48
49         virtual result RemoveNode(LinkedListNode& node);
50
51 protected:
52         LinkedList(void);
53         virtual ~LinkedList(void);
54
55 private:
56         LinkedList(const LinkedList&);
57         LinkedList& operator =(const LinkedList&);
58
59 // property
60 protected:
61         LinkedListNode* _pRootNode;
62         LinkedListNode* _pEndNode;
63
64         friend class _Layout;
65 }; // LinkedList
66
67 }}} //Tizen::Ui::_Layout
68
69 #endif // _FUI_INTERNAL_LAYOUT_LINKED_LIST_H_