types.hh (11990:5fad911cc326) | types.hh (12766:1c347e60c7fd) |
---|---|
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; --- 177 unchanged lines hidden (view full) --- 186 187// Rather than creating a shared_ptr instance and assigning it nullptr, 188// we just create an alias. 189constexpr decltype(nullptr) NoFault = nullptr; 190 191struct AtomicOpFunctor 192{ 193 virtual void operator()(uint8_t *p) = 0; | 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; --- 177 unchanged lines hidden (view full) --- 186 187// Rather than creating a shared_ptr instance and assigning it nullptr, 188// we just create an alias. 189constexpr decltype(nullptr) NoFault = nullptr; 190 191struct AtomicOpFunctor 192{ 193 virtual void operator()(uint8_t *p) = 0; |
194 virtual AtomicOpFunctor* clone() = 0; |
|
194 virtual ~AtomicOpFunctor() {} 195}; 196 197template <class T> 198struct TypedAtomicOpFunctor : public AtomicOpFunctor 199{ 200 void operator()(uint8_t *p) { execute((T *)p); } | 195 virtual ~AtomicOpFunctor() {} 196}; 197 198template <class T> 199struct TypedAtomicOpFunctor : public AtomicOpFunctor 200{ 201 void operator()(uint8_t *p) { execute((T *)p); } |
202 virtual AtomicOpFunctor* clone() = 0; |
|
201 virtual void execute(T * p) = 0; 202}; 203 204enum ByteOrder { 205 BigEndianByteOrder, 206 LittleEndianByteOrder 207}; 208 209#endif // __BASE_TYPES_HH__ | 203 virtual void execute(T * p) = 0; 204}; 205 206enum ByteOrder { 207 BigEndianByteOrder, 208 LittleEndianByteOrder 209}; 210 211#endif // __BASE_TYPES_HH__ |