Dillo v3.1.1-14-g8f67d6e0
Loading...
Searching...
No Matches
oofawarewidget.cc
Go to the documentation of this file.
1/*
2 * Dillo Widget
3 *
4 * Copyright 2014 Sebastian Geerken <sgeerken@dillo.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20#include "oofawarewidget.hh"
21#include "ooffloatsmgr.hh"
22#include "oofposabsmgr.hh"
23#include "oofposrelmgr.hh"
24#include "oofposfixedmgr.hh"
25
26using namespace dw;
27using namespace dw::core;
28using namespace dw::core::style;
29using namespace lout::object;
30using namespace lout::misc;
31using namespace lout::container::typed;
32
33namespace dw {
34
35namespace oof {
36
37const char *OOFAwareWidget::OOFM_NAME[NUM_OOFM] = {
38 "FLOATS", "ABSOLUTE", "RELATIVE", "FIXED"
39};
40
42
44{
45 DBG_OBJ_CREATE ("dw::oof::OOFAwareWidget");
46 registerName ("dw::oof::OOFAwareWidget", &CLASS_ID);
47
48 for (int i = 0; i < NUM_OOFM; i++) {
49 oofContainer[i] = NULL;
50 DBG_OBJ_ARRSET_PTR ("oofContainer", i, oofContainer[i]);
51 outOfFlowMgr[i] = NULL;
52 }
53}
54
56{
57 for (int i = 0; i < NUM_OOFM; i++) {
58 if(outOfFlowMgr[i]) {
59 // I feel more comfortable by letting the OOF aware widget delete
60 // these widgets, instead of doing this in ~OutOfFlowMgr.
61 for (int j = 0; j < outOfFlowMgr[i]->getNumWidgets (); j++)
62 delete outOfFlowMgr[i]->getWidget (j);
63
64 delete outOfFlowMgr[i];
65 }
66 }
67
69}
70
71const char *OOFAwareWidget::stackingLevelText (int level)
72{
73 switch (level) {
74 case SL_START: return "START";
75 case SL_BACKGROUND: return "BACKGROUND";
76 case SL_SC_BOTTOM: return "SC_BOTTOM";
77 case SL_IN_FLOW: return "IN_FLOW";
78 case SL_OOF_REF: return "OOF_REF";
79 case SL_OOF_CONT: return "OOF_CONT";
80 case SL_SC_TOP: return "SC_TOP";
81 case SL_END: return "END";
82 default: return "???";
83 }
84}
85
87{
88 for (int i = 0; i < NUM_OOFM; i++) {
89 oofContainer[i] = this;
90 DBG_OBJ_ARRSET_PTR ("oofContainer", i, oofContainer[i]);
91 }
92}
93
95{
96 DBG_OBJ_ENTER_O ("construct", 0, NULL, "getOOFMIndex", "%p", widget);
97 DBG_OBJ_MSGF_O ("construct", 1, NULL, "position = %s, float = %s",
98 widget->getStyle()->position
99 == style::POSITION_STATIC ? "static" :
100 (widget->getStyle()->position
101 == style::POSITION_RELATIVE ? "relative" :
102 (widget->getStyle()->position
103 == style::POSITION_ABSOLUTE ? "absolute" :
104 (widget->getStyle()->position
105 == style::POSITION_FIXED ? "fixed" : "???"))),
106 widget->getStyle()->vloat == style::FLOAT_NONE ? "none" :
107 (widget->getStyle()->vloat == style::FLOAT_LEFT ? "left" :
108 (widget->getStyle()->vloat == style::FLOAT_RIGHT ?
109 "right" : "???")));
110
111 int index = -1;
112 if (testWidgetFloat (widget))
113 index = OOFM_FLOATS;
114 else if (testWidgetAbsolutelyPositioned (widget))
115 index = OOFM_ABSOLUTE;
116 else if (testWidgetRelativelyPositioned (widget))
117 index = OOFM_RELATIVE;
118 else if (testWidgetFixedlyPositioned (widget))
119 index = OOFM_FIXED;
120 else
122
123 DBG_OBJ_LEAVE_VAL_O (NULL, "%d (%s)", index, OOFM_NAME[index]);
124 return index;
125}
126
127bool OOFAwareWidget::isOOFContainer (Widget *widget, int oofmIndex)
128{
129 // TODO The methods isPossibleContainer() and isPossibleContainerParent()
130 // are only used in few cases. Does not matter currently, however.
131
132 switch (oofmIndex) {
133 case OOFM_FLOATS:
134 return widget->instanceOf (OOFAwareWidget::CLASS_ID) &&
135 (// For floats, only some OOF aware widgets are considered as
136 // containers.
137 ((OOFAwareWidget*)widget)->isPossibleOOFContainer (OOFM_FLOATS) &&
138 // The second condition: that this block is "out of flow", in a
139 // wider sense.
140 (// The toplevel widget is "out of flow", since there is no
141 // parent, and so no context.
142 widget->getParent() == NULL ||
143 // A similar reasoning applies to a widget with an
144 // unsuitable parent (typical example: a table cell (this
145 // is also a text block, so possible float container)
146 // within a table widget, which is not a suitable float
147 // container parent).
149 ((OOFAwareWidget*)widget->getParent())
151 // Inline blocks are containing blocks, too.
152 widget->getStyle()->display == DISPLAY_INLINE_BLOCK ||
153 // Same for blocks with 'overview' set to another value than
154 // (the default value) 'visible'.
155 widget->getStyle()->overflow != OVERFLOW_VISIBLE ||
156 // Finally, "out of flow" in a narrower sense: floats;
157 // absolutely and fixedly positioned elements. (No
158 // relatively positioned elements; since the latters
159 // constitute a stacking context, drawing of floats gets
160 // somewhat more complicated; see "interrupting the drawing
161 // process" in "dw-stacking-context.doc".
162 testWidgetOutOfFlow (widget)));
163
164 case OOFM_RELATIVE:
165 case OOFM_ABSOLUTE:
166 return widget->instanceOf (OOFAwareWidget::CLASS_ID) &&
167 (widget->getParent() == NULL ||
169
170
171 case OOFM_FIXED:
172 // The single container for fixedly positioned elements is the
173 // toplevel (canvas; actually the viewport). (The toplevel
174 // widget should always be a textblock; at least this is the
175 // case in dillo.)
176 return widget->getParent() == NULL;
177
178 default:
179 // compiler happiness
181 return false;
182 }
183}
184
186{
187 // Search for containing blocks.
188 for (int oofmIndex = 0; oofmIndex < NUM_OOFM; oofmIndex++) {
189 oofContainer[oofmIndex] = NULL;
190
191 for (Widget *widget = this;
192 widget != NULL && oofContainer[oofmIndex] == NULL;
193 widget = widget->getParent ())
194 if (isOOFContainer (widget, oofmIndex)) {
195 assert (widget->instanceOf (OOFAwareWidget::CLASS_ID));
196 oofContainer[oofmIndex] = (OOFAwareWidget*)widget;
197 }
198
199 DBG_OBJ_ARRSET_PTR ("oofContainer", oofmIndex, oofContainer[oofmIndex]);
200
201 assert (oofContainer[oofmIndex] != NULL);
202 }
203}
204
235
237 void (*splitHeightFun) (int, int*,
238 int*))
239{
240 DBG_OBJ_ENTER ("resize", 0, "correctRequisitionByOOF", "%d * (%d + %d), ...",
243
245
246 for (int i = 0; i < NUM_OOFM; i++) {
247 if (outOfFlowMgr[i]) {
248 DBG_OBJ_MSGF ("resize", 1, "OOFM for %s", OOFM_NAME[i]);
250
251 int oofWidth, oofHeight;
252
253 outOfFlowMgr[i]->getSize (requisition, &oofWidth, &oofHeight);
254 DBG_OBJ_MSGF ("resize", 1, "result: %d * %d", oofWidth, oofHeight);
255
256 if (oofWidth > requisition->width) {
257 if (outOfFlowMgr[i]->containerMustAdjustExtraSpace () &&
260 oofWidth - requisition->width);
261 DBG_OBJ_SET_NUM ("extraSpace.right", extraSpace.right);
262 }
263
264 requisition->width = oofWidth;
265 }
266
267 if (oofHeight > requisition->ascent + requisition->descent) {
268 if (outOfFlowMgr[i]->containerMustAdjustExtraSpace () &&
271 oofHeight - (requisition->ascent +
273 DBG_OBJ_SET_NUM ("extraSpace.bottom", extraSpace.bottom);
274 }
275
276 splitHeightFun (oofHeight,
278 }
279
282 oofWidth);
283 if (oofHeight >
285 splitHeightFun (oofHeight, &requisitionWithoutOOF.ascent,
287 }
288
289 DBG_OBJ_MSGF ("resize", 1, "after correction: %d * (%d + %d)",
293 } else
294 DBG_OBJ_MSGF ("resize", 1, "no OOFM for %s", OOFM_NAME[i]);
295 }
296
297 DBG_OBJ_SET_NUM ("requisitionWithoutOOF.width", requisitionWithoutOOF.width);
298 DBG_OBJ_SET_NUM ("requisitionWithoutOOF.ascent",
300 DBG_OBJ_SET_NUM ("requisitionWithoutOOF.descent",
302
303 DBG_OBJ_LEAVE ();
304}
305
307{
308 DBG_OBJ_ENTER ("resize", 0, "correctExtremesByOOF", "%d (%d) / %d (%d)",
311
312 for (int i = 0; i < NUM_OOFM; i++) {
313 if (outOfFlowMgr[i]) {
314 DBG_OBJ_MSGF ("resize", 1, "OOFM for %s", OOFM_NAME[i]);
316
317 int oofMinWidth, oofMaxWidth;
318 outOfFlowMgr[i]->getExtremes (extremes, &oofMinWidth, &oofMaxWidth);
319 DBG_OBJ_MSGF ("resize", 1, "result: %d / %d",
320 oofMinWidth, oofMaxWidth);
321
322 extremes->minWidth = max (extremes->minWidth, oofMinWidth);
324 oofMinWidth);
325 extremes->maxWidth = max (extremes->maxWidth, oofMaxWidth);
327 oofMinWidth);
329 oofMinWidth);
330
331 DBG_OBJ_MSGF ("resize", 1, "after correction: %d (%d) / %d (%d)",
335 } else
336 DBG_OBJ_MSGF ("resize", 1, "no OOFM for %s", OOFM_NAME[i]);
337 }
338
339 DBG_OBJ_LEAVE ();
340}
341
343{
344
345 for (int i = 0; i < NUM_OOFM; i++)
346 if (oofContainer[i]->outOfFlowMgr[i])
348}
349
351{
352 for (int i = 0; i < NUM_OOFM; i++)
353 if (oofContainer[i]->outOfFlowMgr[i])
355}
356
363
365{
366 DBG_OBJ_ENTER ("draw", 0, "doesWidgetOOFInterruptDrawing", "%p", widget);
367
368 bool result;
369 if (IMPL_POS) {
370 // This is the generator of the widget.
371 int oofmIndex = getOOFMIndex (widget);
372 DBG_OBJ_MSGF ("draw", 1, "oofmIndex = %d", oofmIndex);
373
374 int cl = oofContainer[oofmIndex]->stackingContextWidget->getLevel (),
376 result = cl < gl;
377
378 DBG_OBJ_MSGF ("draw", 1,"%d < %d => %s", cl, gl, boolToStr (result));
379 } else
380 result = false;
381
382 DBG_OBJ_LEAVE_VAL ("%s", boolToStr (result));
383 return result;
384}
385
387{
388 DBG_OBJ_ENTER ("draw", 0, "draw", "%d, %d, %d * %d",
389 area->x, area->y, area->width, area->height);
390
391 for (int level = SL_START + 1; level < SL_END; level++)
392 drawLevel (view, area, level, context);
393
394 DBG_OBJ_LEAVE ();
395}
396
397void OOFAwareWidget::drawLevel (View *view, Rectangle *area, int level,
398 DrawingContext *context)
399{
400 DBG_OBJ_ENTER ("draw", 0, "OOFAwareWidget::drawLevel",
401 "(%d, %d, %d * %d), %s",
402 area->x, area->y, area->width, area->height,
403 stackingLevelText (level));
404
405 switch (level) {
406 case SL_START:
407 break;
408
409 case SL_BACKGROUND:
410 drawWidgetBox (view, area, false);
411 break;
412
413 case SL_SC_BOTTOM:
415 stackingContextMgr->drawBottom (view, area, context);
416 break;
417
418 case SL_IN_FLOW:
419 // Should be implemented in the sub class.
420 break;
421
422 case SL_OOF_REF:
423 // Should be implemented in the sub class (when references are hold).
424 break;
425
426 case SL_OOF_CONT:
427 drawOOF (view, area, context);
428 break;
429
430 case SL_SC_TOP:
432 stackingContextMgr->drawTop (view, area, context);
433 break;
434
435 case SL_END:
436 break;
437
438 default:
439 fprintf (stderr, "OOFAwareWidget::drawLevel: invalid level %s (%d)",
440 stackingLevelText (level), level);
441 break;
442 }
443
444 DBG_OBJ_LEAVE ();
445}
446
448 DrawingContext *context)
449{
450 for (int i = 0; i < NUM_OOFM; i++) {
451 if(outOfFlowMgr[i])
452 outOfFlowMgr[i]->draw (view, area, context);
453 }
454}
455
458{
459 DBG_OBJ_ENTER ("events", 0, "getWidgetAtPoint", "%d, %d", x, y);
460 Widget *widgetAtPoint = NULL;
461
462 if (inAllocation (x, y)) {
463 for (int level = SL_END - 1; widgetAtPoint == NULL && level > SL_START;
464 level--)
465 widgetAtPoint = getWidgetAtPointLevel (x, y, level, context);
466 }
467
468 DBG_OBJ_MSGF ("events", 1, "=> %p", widgetAtPoint);
469 DBG_OBJ_LEAVE ();
470 return widgetAtPoint;
471}
472
475 *context)
476{
477 DBG_OBJ_ENTER ("events", 0, "OOFAwareWidget::getWidgetAtPointLevel",
478 "%d, %d, %s", x, y, stackingLevelText (level));
479
480 Widget *widgetAtPoint = NULL;
481
482 switch (level) {
483 case SL_BACKGROUND:
484 if (inAllocation (x, y))
485 widgetAtPoint = this;
486 break;
487
488 case SL_SC_BOTTOM:
490 widgetAtPoint =
492 break;
493
494 case SL_IN_FLOW:
495 // Should be implemented in the sub class.
496 assertNotReached ("getWidgetAtPoint (SL_IN_FLOW) for %s",
497 getClassName ());
498 break;
499
500 case SL_OOF_REF:
501 // Should be implemented in the sub class (when references are hold).
502 break;
503
504 case SL_OOF_CONT:
505 widgetAtPoint = getWidgetOOFAtPoint (x, y, context);
506 break;
507
508 case SL_SC_TOP:
510 widgetAtPoint =
512 break;
513
514 default:
515 fprintf (stderr,
516 "OOFAwareWidget::getWidgetAtPointLevel: invalid level %s (%d)",
517 stackingLevelText (level), level);
518 break;
519 }
520
521 DBG_OBJ_MSGF ("events", 1, "=> %p", widgetAtPoint);
522 DBG_OBJ_LEAVE ();
523 return widgetAtPoint;
524}
525
528 *context)
529{
530 Widget *widgetAtPoint = NULL;
531
532 for (int i = NUM_OOFM -1; widgetAtPoint == NULL && i >= 0; i--) {
533 if(outOfFlowMgr[i])
534 widgetAtPoint = outOfFlowMgr[i]->getWidgetAtPoint (x, y, context);
535 }
536
537 return widgetAtPoint;
538}
539
541{
542 // Sub classes should implement this method (and Textblock and
543 // Table do so), so this point is only reached from
544 // ~OOFAwareWidget, which removes widgets out of flow.
545 assert (isWidgetOOF (child));
546}
547
549{
550 notImplemented ("OOFAwareWidget::updateReference");
551}
552
554{
555 notImplemented ("OOFAwareWidget::widgetRefSizeChanged");
556}
557
558void OOFAwareWidget::oofSizeChanged (bool extremesChanged)
559{
560 DBG_OBJ_ENTER ("resize", 0, "oofSizeChanged", "%s",
561 extremesChanged ? "true" : "false");
563
564 // Extremes changes may become also relevant for the children.
565 if (extremesChanged)
567
568 DBG_OBJ_LEAVE ();
569}
570
572{
573 notImplemented ("OOFAwareWidget::getGeneratorX");
574 return 0;
575}
576
578{
579 notImplemented ("OOFAwareWidget::getGeneratorY");
580 return 0;
581}
582
584{
585 notImplemented ("OOFAwareWidget::getGeneratorWidth");
586 return 0;
587}
588
590{
591 notImplemented ("OOFAwareWidget::getMaxGeneratorWidth");
592 return 0;
593}
594
596{
597 notImplemented ("OOFAwareWidget::usesMaxGeneratorWidth");
598 return false;
599}
600
602{
603 return oofmIndex != OOFM_FLOATS;
604}
605
607{
608 return oofmIndex != OOFM_FLOATS;
609}
610
615
616} // namespace oof
617
618} // namespace dw
Set at the top when drawing.
Definition types.hh:295
Set at the top when getting the widget at the point.
Definition types.hh:313
dw::core::Shape implemtation for simple rectangles.
Definition types.hh:70
Widget * getTopWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)
void drawTop(View *view, Rectangle *area, DrawingContext *context)
void drawBottom(View *view, Rectangle *area, DrawingContext *context)
Widget * getBottomWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)
An interface to encapsulate platform dependent drawing.
Definition view.hh:17
The base class of all dillo widgets.
Definition widget.hh:24
Extremes extremes
Analogue to dw::core::Widget::requisition.
Definition widget.hh:146
Allocation allocation
The current allocation: size and position, always relative to the canvas.
Definition widget.hh:183
Widget * getParent()
Definition widget.hh:552
void drawWidgetBox(View *view, Rectangle *area, bool inverse)
Draw borders and background of a widget.
Definition widget.cc:1412
style::Style * getStyle()
Definition widget.hh:448
int getLevel()
Get the level of the widget within the tree.
Definition widget.cc:1493
Widget * stackingContextWidget
The bottom-most ancestor (or this) for which stackingContextMgr is set.
Definition widget.hh:211
StackingContextMgr * stackingContextMgr
Set iff this widget constitutes a stacking context, as defined by CSS.
Definition widget.hh:205
Requisition requisition
Size_request() stores the result of the last call of size_request_impl().
Definition widget.hh:140
style::Box extraSpace
Space around the margin box.
Definition widget.hh:199
bool inAllocation(int x, int y)
Definition widget.hh:451
bool extremesChanged()
Definition widget.hh:440
void containerSizeChanged()
Definition widget.cc:408
void queueResize(int ref, bool extremesChanged, bool fast)
This method should be called, when a widget changes its size.
Definition widget.cc:309
Base class for widgets which can act as container and generator for widgets out of flow.
void notifySetAsTopLevel()
This method is called after a widget has been set as the top of a widget tree.
static bool testWidgetFixedlyPositioned(Widget *widget)
Widget * getWidgetOOFAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)
virtual int getMaxGeneratorWidth()
OutOfFlowMgr * outOfFlowMgr[NUM_OOFM]
virtual Widget * getWidgetAtPointLevel(int x, int y, int level, core::GettingWidgetAtPointContext *context)
virtual int getGeneratorX(int oofmIndex)
Return position relative to container, not regarding margin/border/padding, Called by OOFFloatsMgr to...
virtual void drawLevel(core::View *view, core::Rectangle *area, int level, core::DrawingContext *context)
virtual void updateReference(int ref)
Update content in flow, down from ref.
void draw(core::View *view, core::Rectangle *area, core::DrawingContext *context)
Area is given in widget coordinates.
void sizeAllocateStart(core::Allocation *allocation)
virtual int getGeneratorWidth()
Return width including margin/border/padding Called by OOFFloatsMgr to position floats.
Widget * getWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)
bool isWidgetOOF(Widget *widget)
bool doesWidgetOOFInterruptDrawing(Widget *widget)
virtual void oofSizeChanged(bool extremesChanged)
Called by an implementation of dw::oof::OutOfFlowMgr when the size of the container has changed,...
static bool testWidgetAbsolutelyPositioned(Widget *widget)
static const char * stackingLevelText(int level)
OOFAwareWidget * oofContainer[NUM_OOFM]
virtual bool adjustExtraSpaceWhenCorrectingRequisitionByOOF()
static bool isOOFContainer(Widget *widget, int oofmIndex)
void correctRequisitionByOOF(core::Requisition *requisition, void(*splitHeightFun)(int, int *, int *))
void removeChild(Widget *child)
virtual bool isPossibleOOFContainer(int oofmIndex)
void notifySetParent()
This method is called after a widget has been added to a parent.
virtual void widgetRefSizeChanged(int externalIndex)
Called by an implementation of dw::oof::OutOfFlowMgr (actually only OOFPosRelMgr) for the generator o...
void correctExtremesByOOF(core::Extremes *extremes)
static const char * OOFM_NAME[NUM_OOFM]
static int getOOFMIndex(Widget *widget)
core::Requisition requisitionWithoutOOF
static bool testWidgetFloat(Widget *widget)
virtual bool usesMaxGeneratorWidth()
static bool testWidgetPositioned(Widget *widget)
static bool testWidgetOutOfFlow(Widget *widget)
void drawOOF(core::View *view, core::Rectangle *area, core::DrawingContext *context)
virtual int getGeneratorY(int oofmIndex)
Return position relative to container, not regarding margin/border/padding, Called by OOFFloatsMgr to...
virtual bool isPossibleOOFContainerParent(int oofmIndex)
static bool testWidgetRelativelyPositioned(Widget *widget)
OutOfFlowMgr implementation dealing with floats.
virtual void getExtremes(core::Extremes *containerExtr, int *oofMinWidth, int *oofMaxWidth)=0
virtual core::Widget * getWidgetAtPoint(int x, int y, core::GettingWidgetAtPointContext *context)=0
virtual int getNumWidgets()=0
virtual void containerSizeChangedForChildren()=0
virtual void getSize(core::Requisition *containerReq, int *oofWidth, int *oofHeight)=0
virtual void sizeAllocateStart(OOFAwareWidget *caller, core::Allocation *allocation)=0
virtual void sizeAllocateEnd(OOFAwareWidget *caller)=0
virtual void draw(core::View *view, core::Rectangle *area, core::DrawingContext *context)=0
bool instanceOf(int otherClassId)
Returns, whether this class is an instance of the class, given by otherClassId, or of a sub class of ...
Definition identity.cc:105
const char * getClassName()
Return the name, under which the class of this object was registered.
Definition identity.hh:140
void registerName(const char *className, int *classId)
This method must be called in the constructor for the sub class.
Definition identity.cc:83
#define DBG_OBJ_DELETE()
#define DBG_OBJ_CREATE(klass)
#define DBG_OBJ_MSG_END()
#define DBG_OBJ_MSGF(aspect, prio, fmt,...)
#define DBG_OBJ_SET_NUM(var, val)
#define DBG_OBJ_LEAVE_VAL_O(obj, fmt,...)
#define DBG_OBJ_MSGF_O(aspect, prio, obj, fmt,...)
#define DBG_OBJ_ENTER(aspect, prio, funname, fmt,...)
#define DBG_OBJ_ASSOC(parent, child)
#define DBG_OBJ_LEAVE()
#define DBG_OBJ_MSG_START()
#define DBG_OBJ_ARRSET_PTR(var, ind, val)
#define DBG_OBJ_LEAVE_VAL(fmt,...)
#define DBG_OBJ_ENTER_O(aspect, prio, obj, funname, fmt,...)
Anything related to Dillo Widget styles is defined here.
Definition style.cc:33
@ DISPLAY_INLINE_BLOCK
Definition style.hh:280
The core of Dw is defined in this namespace.
Definition core.hh:23
Dw is in this namespace, or sub namespaces of this one.
@ IMPL_POS
Definition core.hh:16
This namespace provides thin wrappers, implemented as C++ templates, to gain type-safety.
Definition container.hh:387
Miscellaneous stuff, which does not fit anywhere else.
Definition misc.cc:31
void notImplemented(const char *name)
Definition misc.hh:55
T max(T a, T b)
Definition misc.hh:20
void assertNotReached()
Definition misc.hh:35
const char * boolToStr(bool b)
Definition misc.hh:87
Here, some common classes (or interfaces) are defined, to standardize the access to other classes.
Definition object.cc:29
Represents the allocation, i.e.
Definition types.hh:164