inline typename boost::enable_if<is_multi_array<T>, dataset>::type create_dataset(h5xxObject const& object, std::string const& name, T const& value, StoragePolicy const& storage_policy = StoragePolicy()) { typedef typename T::element value_type; hid_t type_id = ctype<value_type>::hid(); // this ID must not be closed enum { rank = T::dimensionality }; // --- create a temporary dataspace based on the input array dimensions boost::array<hsize_t, rank> dims; std::copy(value.shape(), value.shape() + rank, dims.begin()); return dataset(object, name, type_id, dataspace(dims), storage_policy); }
NS_IMETHODIMP nsCacheSession::IsStorageEnabled(bool *result) { return nsCacheService::IsStorageEnabledForPolicy(StoragePolicy(), result); }