bitunion.hh (5543:3af77710f397) | bitunion.hh (6215:9aed64c9f10f) |
---|---|
1/* 2 * Copyright (c) 2007-2008 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 17 unchanged lines hidden (view full) --- 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Gabe Black 29 */ 30 31#ifndef __BASE_BITUNION_HH__ 32#define __BASE_BITUNION_HH__ 33 | 1/* 2 * Copyright (c) 2007-2008 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 17 unchanged lines hidden (view full) --- 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * 28 * Authors: Gabe Black 29 */ 30 31#ifndef __BASE_BITUNION_HH__ 32#define __BASE_BITUNION_HH__ 33 |
34#include <inttypes.h> | |
35#include "base/bitfield.hh" | 34#include "base/bitfield.hh" |
35#include "base/types.hh" |
|
36 37// The following implements the BitUnion system of defining bitfields 38//on top of an underlying class. This is done through the pervasive use of 39//both named and unnamed unions which all contain the same actual storage. 40//Since they're unioned with each other, all of these storage locations 41//overlap. This allows all of the bitfields to manipulate the same data 42//without having to have access to each other. More details are provided with 43//the individual components. --- 266 unchanged lines hidden --- | 36 37// The following implements the BitUnion system of defining bitfields 38//on top of an underlying class. This is done through the pervasive use of 39//both named and unnamed unions which all contain the same actual storage. 40//Since they're unioned with each other, all of these storage locations 41//overlap. This allows all of the bitfields to manipulate the same data 42//without having to have access to each other. More details are provided with 43//the individual components. --- 266 unchanged lines hidden --- |