ReactOS  0.4.14-dev-49-gfb4591c
BookmarkNode Struct Reference

#include <favorites.h>

Collaboration diagram for BookmarkNode:

Public Types

enum  BOOKMARKNODE_TYPE { BMNT_NONE, BMNT_BOOKMARK, BMNT_FOLDER }
 

Public Member Functions

 BookmarkNode ()
 
 BookmarkNode (const Bookmark &bm)
 
 BookmarkNode (const BookmarkFolder &bmf)
 
 BookmarkNode (const BookmarkNode &other)
 
 ~BookmarkNode ()
 
BookmarkNodeoperator= (const Bookmark &bm)
 
BookmarkNodeoperator= (const BookmarkFolder &bmf)
 
BookmarkNodeoperator= (const BookmarkNode &other)
 
void clear ()
 

Public Attributes

BOOKMARKNODE_TYPE _type
 
union {
   Bookmark *   _pbookmark
 
   BookmarkFolder *   _pfolder
 
}; 
 

Detailed Description

Definition at line 49 of file favorites.h.

Member Enumeration Documentation

◆ BOOKMARKNODE_TYPE

Enumerator
BMNT_NONE 
BMNT_BOOKMARK 
BMNT_FOLDER 

Definition at line 64 of file favorites.h.

Constructor & Destructor Documentation

◆ BookmarkNode() [1/4]

BookmarkNode::BookmarkNode ( )

Definition at line 196 of file favorites.cpp.

197  : _type(BMNT_NONE)
198 {
199  _pbookmark = NULL;
200 }
Bookmark * _pbookmark
Definition: favorites.h:71
smooth NULL
Definition: ftsmooth.c:416
BOOKMARKNODE_TYPE _type
Definition: favorites.h:68

◆ BookmarkNode() [2/4]

BookmarkNode::BookmarkNode ( const Bookmark bm)

Definition at line 202 of file favorites.cpp.

204 {
205  _pbookmark = new Bookmark(bm);
206 }
Bookmark * _pbookmark
Definition: favorites.h:71
BOOKMARKNODE_TYPE _type
Definition: favorites.h:68
struct Bookmark Bookmark

◆ BookmarkNode() [3/4]

BookmarkNode::BookmarkNode ( const BookmarkFolder bmf)

Definition at line 208 of file favorites.cpp.

209  : _type(BMNT_FOLDER)
210 {
211  _pfolder = new BookmarkFolder(bmf);
212 }
BookmarkFolder * _pfolder
Definition: favorites.h:72
BOOKMARKNODE_TYPE _type
Definition: favorites.h:68

◆ BookmarkNode() [4/4]

BookmarkNode::BookmarkNode ( const BookmarkNode other)

Definition at line 214 of file favorites.cpp.

215  : _type(other._type)
216 {
217  if (other._type == BMNT_BOOKMARK)
218  _pbookmark = new Bookmark(*other._pbookmark);
219  else if (other._type == BMNT_FOLDER)
220  _pfolder = new BookmarkFolder(*other._pfolder);
221  else
222  _pbookmark = NULL;
223 }
int other
Definition: msacm.c:1364
Bookmark * _pbookmark
Definition: favorites.h:71
smooth NULL
Definition: ftsmooth.c:416
BookmarkFolder * _pfolder
Definition: favorites.h:72
BOOKMARKNODE_TYPE _type
Definition: favorites.h:68
struct Bookmark Bookmark

◆ ~BookmarkNode()

BookmarkNode::~BookmarkNode ( )

Definition at line 225 of file favorites.cpp.

226 {
227  if (_type == BMNT_BOOKMARK)
228  delete _pbookmark;
229  else if (_type == BMNT_FOLDER)
230  delete _pfolder;
231 }
Bookmark * _pbookmark
Definition: favorites.h:71
BookmarkFolder * _pfolder
Definition: favorites.h:72
BOOKMARKNODE_TYPE _type
Definition: favorites.h:68

Member Function Documentation

◆ clear()

void BookmarkNode::clear ( void  )

Definition at line 265 of file favorites.cpp.

266 {
267  if (_type == BMNT_BOOKMARK) {
268  delete _pbookmark;
269  _pbookmark = NULL;
270  }
271  else if (_type == BMNT_FOLDER) {
272  delete _pfolder;
273  _pfolder = NULL;
274  }
275 
276  _type = BMNT_NONE;
277 }
Bookmark * _pbookmark
Definition: favorites.h:71
smooth NULL
Definition: ftsmooth.c:416
BookmarkFolder * _pfolder
Definition: favorites.h:72
BOOKMARKNODE_TYPE _type
Definition: favorites.h:68

Referenced by operator=().

◆ operator=() [1/3]

Definition at line 233 of file favorites.cpp.

234 {
235  clear();
236 
237  _pbookmark = new Bookmark(bm);
238 
239  return *this;
240 }
void clear()
Definition: favorites.cpp:265
Bookmark * _pbookmark
Definition: favorites.h:71
struct Bookmark Bookmark

◆ operator=() [2/3]

Definition at line 242 of file favorites.cpp.

243 {
244  clear();
245 
246  _pfolder = new BookmarkFolder(bmf);
247 
248  return *this;
249 }
void clear()
Definition: favorites.cpp:265
BookmarkFolder * _pfolder
Definition: favorites.h:72

◆ operator=() [3/3]

Definition at line 251 of file favorites.cpp.

252 {
253  clear();
254 
255  _type = other._type;
256 
257  if (other._type == BMNT_BOOKMARK)
258  _pbookmark = new Bookmark(*other._pbookmark);
259  else if (other._type == BMNT_FOLDER)
260  _pfolder = new BookmarkFolder(*other._pfolder);
261 
262  return *this;
263 }
int other
Definition: msacm.c:1364
void clear()
Definition: favorites.cpp:265
Bookmark * _pbookmark
Definition: favorites.h:71
BookmarkFolder * _pfolder
Definition: favorites.h:72
BOOKMARKNODE_TYPE _type
Definition: favorites.h:68
struct Bookmark Bookmark

Member Data Documentation

◆ @1502

union { ... }

◆ _pbookmark

Bookmark* BookmarkNode::_pbookmark

Definition at line 71 of file favorites.h.

Referenced by BookmarkNode(), clear(), operator=(), and ~BookmarkNode().

◆ _pfolder

BookmarkFolder* BookmarkNode::_pfolder

Definition at line 72 of file favorites.h.

Referenced by BookmarkNode(), clear(), operator=(), and ~BookmarkNode().

◆ _type

BOOKMARKNODE_TYPE BookmarkNode::_type

Definition at line 68 of file favorites.h.

Referenced by clear(), operator=(), and ~BookmarkNode().


The documentation for this struct was generated from the following files: