bool operator<(const aobject &rhs) const { POTHOS_ASSERT(NULL != address); POTHOS_ASSERT(NULL != rhs.address); if( address < rhs.address ) return true; if( address > rhs.address ) return false; return class_id < rhs.class_id; }
virtual const char *what( ) const throw( ) { const char *msg = "unknown exception code"; switch(code){ case invalid_code: msg = "attempt to encode a value > 6 bits"; break; case invalid_character: msg = "attempt to decode a value not in base64 char set"; break; default: POTHOS_ASSERT(false); break; } return msg; }
virtual void * construct(unsigned int count, ...) const{ // count up the arguments std::va_list ap; va_start(ap, count); switch(count){ case 0: return factory<POTHOS_DEDUCED_TYPENAME Pothos::remove_const< T >::type, 0>(ap); case 1: return factory<POTHOS_DEDUCED_TYPENAME Pothos::remove_const< T >::type, 1>(ap); case 2: return factory<POTHOS_DEDUCED_TYPENAME Pothos::remove_const< T >::type, 2>(ap); case 3: return factory<POTHOS_DEDUCED_TYPENAME Pothos::remove_const< T >::type, 3>(ap); case 4: return factory<POTHOS_DEDUCED_TYPENAME Pothos::remove_const< T >::type, 4>(ap); default: POTHOS_ASSERT(false); // too many arguments // throw exception here? return NULL; } }
T * operator->() const // never throws { POTHOS_ASSERT(px != 0); return px; }
T & operator*() const // never throws { POTHOS_ASSERT(px != 0); return *px; }
void reset(T * p = 0) { POTHOS_ASSERT(p == 0 || p != px); shared_ptr(p).swap(*this); }
// trap usage of invalid uninitialized boolean void load(bool & t){ load_binary(& t, sizeof(t)); int i = t; POTHOS_ASSERT(0 == i || 1 == i); (void)i; // warning suppression for release builds. }
void save_object_data( basic_oarchive & /*ar*/, const void * /*x*/ ) const { POTHOS_ASSERT(false); }
// returns true if this class is polymorphic bool is_polymorphic() const{ POTHOS_ASSERT(false); return false; }
// returns class version version_type version() const { POTHOS_ASSERT(false); return version_type(0); }
// returns true if objects should be tracked bool tracking(const unsigned int) const { POTHOS_ASSERT(false); return false; }
bool class_info() const { POTHOS_ASSERT(false); return false; }
// convert to bool operator bool (){ POTHOS_ASSERT(is_indeterminant != m_state); return is_true == m_state ? true : false; }