ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev++.h
(Generate patch)

Comparing libev/ev++.h (file contents):
Revision 1.35 by llucax, Tue Jan 22 17:57:17 2008 UTC vs.
Revision 1.36 by root, Tue Jan 22 18:09:23 2008 UTC

131#endif 131#endif
132 132
133 struct loop_ref 133 struct loop_ref
134 { 134 {
135 135
136 loop_ref (EV_P) 136 loop_ref (EV_P) throw ()
137#if EV_MULTIPLICITY 137#if EV_MULTIPLICITY
138 throw (bad_loop) : EV_AX (EV_A) 138 : EV_AX (EV_A)
139 { 139#endif
140 if (!EV_AX)
141 throw bad_loop ();
142 } 140 {
143#else
144 throw ()
145 { 141 }
146 }
147#endif
148 142
149 bool operator == (const loop_ref &other) const throw () 143 bool operator == (const loop_ref &other) const throw ()
150 { 144 {
151#if EV_MULTIPLICITY 145#if EV_MULTIPLICITY
152 return EV_AX == other.EV_AX; 146 return EV_AX == other.EV_AX;
344#endif 338#endif
345 339
346 }; 340 };
347 341
348#if EV_MULTIPLICITY 342#if EV_MULTIPLICITY
349 struct dynamic_loop: loop_ref 343 struct dynamic_loop : loop_ref
350 { 344 {
351 345
352 dynamic_loop (unsigned int flags = AUTO) throw (bad_loop) 346 dynamic_loop (unsigned int flags = AUTO) throw (bad_loop)
353 : loop_ref (ev_loop_new (flags)) 347 : loop_ref (ev_loop_new (flags))
354 { 348 {
349 if (!EV_AX)
350 throw bad_loop ();
355 } 351 }
356 352
357 ~dynamic_loop () throw () 353 ~dynamic_loop () throw ()
358 { 354 {
359 ev_loop_destroy (EV_AX); 355 ev_loop_destroy (EV_AX);
367 dynamic_loop & operator= (const dynamic_loop &); 363 dynamic_loop & operator= (const dynamic_loop &);
368 364
369 }; 365 };
370#endif 366#endif
371 367
372 struct default_loop: loop_ref 368 struct default_loop : loop_ref
373 { 369 {
374 370
375 default_loop (unsigned int flags = AUTO) throw (bad_loop) 371 default_loop (unsigned int flags = AUTO) throw (bad_loop)
376#if EV_MULTIPLICITY 372#if EV_MULTIPLICITY
377 : loop_ref (ev_default_loop (flags)) 373 : loop_ref (ev_default_loop (flags))
378#endif 374#endif
379 { 375 {
376 if (
380#if !EV_MULTIPLICITY 377#if EV_MULTIPLICITY
378 !EV_AX
379#else
381 if (!ev_default_loop (flags)) 380 !ev_default_loop (flags)
381#endif
382 )
382 throw bad_loop (); 383 throw bad_loop ();
383#endif
384 } 384 }
385 385
386 ~default_loop () throw () 386 ~default_loop () throw ()
387 { 387 {
388 ev_default_destroy (); 388 ev_default_destroy ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines