bitunion.hh (5442:0552284c5b8b) | bitunion.hh (5543:3af77710f397) |
---|---|
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; --- 20 unchanged lines hidden (view full) --- 29 */ 30 31#ifndef __BASE_BITUNION_HH__ 32#define __BASE_BITUNION_HH__ 33 34#include <inttypes.h> 35#include "base/bitfield.hh" 36 | 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; --- 20 unchanged lines hidden (view full) --- 29 */ 30 31#ifndef __BASE_BITUNION_HH__ 32#define __BASE_BITUNION_HH__ 33 34#include <inttypes.h> 35#include "base/bitfield.hh" 36 |
37// The following implements the BitUnion system of defining bitfields | 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. 44 45//This namespace is for classes which implement the backend of the BitUnion --- 264 unchanged lines hidden --- | 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. 44 45//This namespace is for classes which implement the backend of the BitUnion --- 264 unchanged lines hidden --- |