ReactOS 0.4.16-dev-92-g0c2cdca
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.

198{
200}
#define NULL
Definition: types.h:112
Bookmark * _pbookmark
Definition: favorites.h:71
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}

◆ BookmarkNode() [3/4]

BookmarkNode::BookmarkNode ( const BookmarkFolder bmf)

Definition at line 208 of file favorites.cpp.

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

◆ 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
223}
int other
Definition: msacm.c:1376

◆ ~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}

Member Function Documentation

◆ clear()

void BookmarkNode::clear ( )

Definition at line 265 of file favorites.cpp.

266{
267 if (_type == BMNT_BOOKMARK) {
268 delete _pbookmark;
270 }
271 else if (_type == BMNT_FOLDER) {
272 delete _pfolder;
273 _pfolder = NULL;
274 }
275
277}

Referenced by operator=().

◆ operator=() [1/3]

BookmarkNode & BookmarkNode::operator= ( const Bookmark bm)

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

◆ operator=() [2/3]

BookmarkNode & BookmarkNode::operator= ( const BookmarkFolder bmf)

Definition at line 242 of file favorites.cpp.

243{
244 clear();
245
246 _pfolder = new BookmarkFolder(bmf);
247
248 return *this;
249}

◆ operator=() [3/3]

BookmarkNode & BookmarkNode::operator= ( const BookmarkNode other)

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}

Member Data Documentation

◆ 

union { ... } BookmarkNode::@1545

◆ _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: