5 * Created by Udi on 12/19/06.
6 * Copyright 2006 __MyCompanyName__. All rights reserved.
9 #if !defined(_AKUPARA_BASICS_HPP__INCLUDED_)
10 #define _AKUPARA_BASICS_HPP__INCLUDED_
12 #include "WavesPublicAPI/wstdint.h"
16 // The ultimate nothingness
17 // This is useful for writing constructors that nullify their object, and for testing nullness
21 null_type(const null_type *) {} // this allows 0 to be implicitly converted to null_type
23 inline null_type null() { return null_type(); }
26 // This is a byte, guaranteed to be unsigned regardless of your compiler's char signedness
27 typedef uint8_t byte_type;
30 // derive from this if your class needs to be noncopyable
31 class noncopyable_type
34 noncopyable_type(const noncopyable_type &);
35 noncopyable_type &operator=(const noncopyable_type &);
41 } // namespace Akupara
45 #define AKUPARA_EXPECT_FALSE(x) __builtin_expect(x,false)
46 #define AKUPARA_EXPECT_TRUE(x) __builtin_expect(x,true )
48 #define AKUPARA_EXPECT_FALSE(x) x
49 #define AKUPARA_EXPECT_TRUE(x) x
53 #endif // _AKUPARA_BASICS_HPP__INCLUDED_