You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libpEpDatatypes/src/bloblist.cc

46 lines
881 B

#include "bloblist.hh"
#include <pEp/bloblist.h>
namespace pEp
{
template<>
void Wrapper<::bloblist_t*>::_free(::bloblist_t* bl)
{
::free_bloblist(bl);
}
// template<>
int BlobList::size() const
{
return bloblist_length(value);
}
// faster than .size()==0 because it's not necessary to iterate throgh the whole list
// template<>
bool BlobList::empty() const
{
return !(value && value->value);
}
// template<>
void BlobList::clear()
{
free_bloblist(value);
value = nullptr;
}
// template<>
void BlobList::push_back(Blob&& s)
{
// TODO
}
////////////////
// no explicit instantiation noecessary, because of fully specialized class template. Okay. :-D
// template class ListWrapper<::bloblist_t*, void>;
} // end of namespace pEp