types.hh (13592:b8972ccebd63) types.hh (14297:b4519e586f5e)
1/*
2 * Copyright (c) 2003-2005 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;

--- 245 unchanged lines hidden (view full) ---

254template <class T>
255struct TypedAtomicOpFunctor : public AtomicOpFunctor
256{
257 void operator()(uint8_t *p) { execute((T *)p); }
258 virtual AtomicOpFunctor* clone() = 0;
259 virtual void execute(T * p) = 0;
260};
261
1/*
2 * Copyright (c) 2003-2005 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;

--- 245 unchanged lines hidden (view full) ---

254template <class T>
255struct TypedAtomicOpFunctor : public AtomicOpFunctor
256{
257 void operator()(uint8_t *p) { execute((T *)p); }
258 virtual AtomicOpFunctor* clone() = 0;
259 virtual void execute(T * p) = 0;
260};
261
262typedef std::unique_ptr<AtomicOpFunctor> AtomicOpFunctorPtr;
263
262enum ByteOrder {
263 BigEndianByteOrder,
264 LittleEndianByteOrder
265};
266
267#endif // __BASE_TYPES_HH__
264enum ByteOrder {
265 BigEndianByteOrder,
266 LittleEndianByteOrder
267};
268
269#endif // __BASE_TYPES_HH__