aidl::
  
    #include <persistable_bundle_aidl.h>
  
Wrapper class that enables interop with AIDL NDK generation Takes ownership of the APersistableBundle* given to it in reset() and will automatically destroy it in the destructor, similar to a smart pointer container.
Summary
| Constructors and Destructors | |
|---|---|
| PersistableBundle() | |
| PersistableBundle(APersistableBundle *_Nonnull bundle) | |
| PersistableBundle(PersistableBundle && other) | |
| PersistableBundle(const PersistableBundle & other) | |
| ~PersistableBundle() | 
| Public functions | |
|---|---|
| deepEquals(const PersistableBundle & rhs) const  | boolCheck the actual contents of the bundle for equality.  | 
| erase(const std::string & key) | int32_t | 
| getBoolean(const std::string & key, bool *_Nonnull val) | bool | 
| getBooleanKeys() | std::set< std::string > | 
| getBooleanVector(const std::string & key, std::vector< bool > *_Nonnull vec) | bool | 
| getBooleanVectorKeys() | std::set< std::string > | 
| getDouble(const std::string & key, double *_Nonnull val) | bool | 
| getDoubleKeys() | std::set< std::string > | 
| getDoubleVector(const std::string & key, std::vector< double > *_Nonnull vec) | bool | 
| getDoubleVectorKeys() | std::set< std::string > | 
| getInt(const std::string & key, int32_t *_Nonnull val) | bool | 
| getIntKeys() | std::set< std::string > | 
| getIntVector(const std::string & key, std::vector< int32_t > *_Nonnull vec) | bool | 
| getIntVectorKeys() | std::set< std::string > | 
| getKeys(int32_t(*)(const APersistableBundle *_Nonnull pBundle, char *_Nullable *_Nullable outKeys, int32_t bufferSizeBytes, APersistableBundle_stringAllocator stringAllocator, void *_Nullable) getTypedKeys, const APersistableBundle *_Nonnull pBundle) | std::set< std::string > | 
| getLong(const std::string & key, int64_t *_Nonnull val) | bool | 
| getLongKeys() | std::set< std::string > | 
| getLongVector(const std::string & key, std::vector< int64_t > *_Nonnull vec) | bool | 
| getLongVectorKeys() | std::set< std::string > | 
| getMonKeys() | std::set< std::string > | 
| getPersistableBundle(const std::string & key, PersistableBundle *_Nonnull val) | bool | 
| getPersistableBundleKeys() | std::set< std::string > | 
| getString(const std::string & key, std::string *_Nonnull val) | bool | 
| getStringKeys() | std::set< std::string > | 
| getStringVector(const std::string & key, std::vector< std::string > *_Nonnull vec) | bool | 
| getStringVectorKeys() | std::set< std::string > | 
| getVecInternal(int32_t(*)(const APersistableBundle *_Nonnull, const char *_Nonnull, T *_Nullable, int32_t) getVec, const APersistableBundle *_Nonnull pBundle, const char *_Nonnull key, std::vector< T > *_Nonnull vec) | bool | 
| moveStringsInternal(char *_Nullable *_Nonnull strings, int32_t bufferSizeBytes) | T | 
| operator!=(const PersistableBundle & rhs) const  | bool | 
| operator<(const PersistableBundle & rhs) const  | bool | 
| operator<=(const PersistableBundle & rhs) const  | bool | 
| operator=(const PersistableBundle & other) | |
| operator=(PersistableBundle && other) noexcept | |
| operator==(const PersistableBundle & rhs) const  | boolNOTE: This does NOT check the contents of the PersistableBundle.  | 
| operator>(const PersistableBundle & rhs) const  | bool | 
| operator>=(const PersistableBundle & rhs) const  | bool | 
| putBoolean(const std::string & key, bool val) | void | 
| putBooleanVector(const std::string & key, const std::vector< bool > & vec) | void | 
| putDouble(const std::string & key, double val) | void | 
| putDoubleVector(const std::string & key, const std::vector< double > & vec) | void | 
| putInt(const std::string & key, int32_t val) | void | 
| putIntVector(const std::string & key, const std::vector< int32_t > & vec) | void | 
| putLong(const std::string & key, int64_t val) | void | 
| putLongVector(const std::string & key, const std::vector< int64_t > & vec) | void | 
| putPersistableBundle(const std::string & key, const PersistableBundle & pBundle) | void | 
| putString(const std::string & key, const std::string & val) | void | 
| putStringVector(const std::string & key, const std::vector< std::string > & vec) | void | 
| readFromParcel(const AParcel *_Nonnull parcel) | |
| release() noexcept | APersistableBundle *_NullableStops managing any contained APersistableBundle*, returning it to the caller.  | 
| reset(APersistableBundle *_Nullable pBundle) noexcept | voidDestroys any currently owned APersistableBundle* and takes ownership of the given APersistableBundle*.  | 
| size() const  | int32_t | 
| toString() const  | std::string | 
| writeToParcel(AParcel *_Nonnull parcel) const  | |
| Public static functions | |
|---|---|
| stringAllocator(int32_t bufferSizeBytes, void *_Nullable) | char *_Nullable | 
Public functions
PersistableBundle
PersistableBundle() noexcept
PersistableBundle
PersistableBundle( APersistableBundle *_Nonnull bundle ) noexcept
PersistableBundle
PersistableBundle( PersistableBundle && other ) noexcept
PersistableBundle
PersistableBundle( const PersistableBundle & other )
deepEquals
bool deepEquals( const PersistableBundle & rhs ) const
Check the actual contents of the bundle for equality.
This is typically what should be used to check for equality.
erase
int32_t erase( const std::string & key )
getBoolean
bool getBoolean( const std::string & key, bool *_Nonnull val )
getBooleanKeys
std::set< std::string > getBooleanKeys()
getBooleanVector
bool getBooleanVector( const std::string & key, std::vector< bool > *_Nonnull vec )
getBooleanVectorKeys
std::set< std::string > getBooleanVectorKeys()
getDouble
bool getDouble( const std::string & key, double *_Nonnull val )
getDoubleKeys
std::set< std::string > getDoubleKeys()
getDoubleVector
bool getDoubleVector( const std::string & key, std::vector< double > *_Nonnull vec )
getDoubleVectorKeys
std::set< std::string > getDoubleVectorKeys()
getInt
bool getInt( const std::string & key, int32_t *_Nonnull val )
getIntKeys
std::set< std::string > getIntKeys()
getIntVector
bool getIntVector( const std::string & key, std::vector< int32_t > *_Nonnull vec )
getIntVectorKeys
std::set< std::string > getIntVectorKeys()
getKeys
std::set< std::string > getKeys( int32_t(*)(const APersistableBundle *_Nonnull pBundle, char *_Nullable *_Nullable outKeys, int32_t bufferSizeBytes, APersistableBundle_stringAllocator stringAllocator, void *_Nullable) getTypedKeys, const APersistableBundle *_Nonnull pBundle )
getLong
bool getLong( const std::string & key, int64_t *_Nonnull val )
getLongKeys
std::set< std::string > getLongKeys()
getLongVector
bool getLongVector( const std::string & key, std::vector< int64_t > *_Nonnull vec )
getLongVectorKeys
std::set< std::string > getLongVectorKeys()
getMonKeys
std::set< std::string > getMonKeys()
getPersistableBundle
bool getPersistableBundle( const std::string & key, PersistableBundle *_Nonnull val )
getPersistableBundleKeys
std::set< std::string > getPersistableBundleKeys()
getString
bool getString( const std::string & key, std::string *_Nonnull val )
getStringKeys
std::set< std::string > getStringKeys()
getStringVector
bool getStringVector( const std::string & key, std::vector< std::string > *_Nonnull vec )
getStringVectorKeys
std::set< std::string > getStringVectorKeys()
getVecInternal
bool getVecInternal( int32_t(*)(const APersistableBundle *_Nonnull, const char *_Nonnull, T *_Nullable, int32_t) getVec, const APersistableBundle *_Nonnull pBundle, const char *_Nonnull key, std::vector< T > *_Nonnull vec )
moveStringsInternal
T moveStringsInternal( char *_Nullable *_Nonnull strings, int32_t bufferSizeBytes )
operator!=
bool operator!=( const PersistableBundle & rhs ) const
operator<
bool operator<( const PersistableBundle & rhs ) const
operator<=
bool operator<=( const PersistableBundle & rhs ) const
operator=
PersistableBundle & operator=( const PersistableBundle & other )
operator=
PersistableBundle & operator=( PersistableBundle && other ) noexcept
operator==
bool operator==( const PersistableBundle & rhs ) const
NOTE: This does NOT check the contents of the PersistableBundle.
This is implemented for ordering. Use deepEquals() to check for equality between two different PersistableBundle objects.
operator>
bool operator>( const PersistableBundle & rhs ) const
operator>=
bool operator>=( const PersistableBundle & rhs ) const
putBoolean
void putBoolean( const std::string & key, bool val )
putBooleanVector
void putBooleanVector( const std::string & key, const std::vector< bool > & vec )
putDouble
void putDouble( const std::string & key, double val )
putDoubleVector
void putDoubleVector( const std::string & key, const std::vector< double > & vec )
putInt
void putInt( const std::string & key, int32_t val )
putIntVector
void putIntVector( const std::string & key, const std::vector< int32_t > & vec )
putLong
void putLong( const std::string & key, int64_t val )
putLongVector
void putLongVector( const std::string & key, const std::vector< int64_t > & vec )
putPersistableBundle
void putPersistableBundle( const std::string & key, const PersistableBundle & pBundle )
putString
void putString( const std::string & key, const std::string & val )
putStringVector
void putStringVector( const std::string & key, const std::vector< std::string > & vec )
readFromParcel
binder_status_t readFromParcel( const AParcel *_Nonnull parcel )
release
APersistableBundle *_Nullable release() noexcept
Stops managing any contained APersistableBundle*, returning it to the caller.
Ownership is released.
| Details | |
|---|---|
| Returns | APersistableBundle* or null if this was empty  | 
reset
void reset( APersistableBundle *_Nullable pBundle ) noexcept
Destroys any currently owned APersistableBundle* and takes ownership of the given APersistableBundle*.
| Details | |||
|---|---|---|---|
| Parameters | 
 | 
size
int32_t size() const
toString
std::string toString() const
writeToParcel
binder_status_t writeToParcel( AParcel *_Nonnull parcel ) const
~PersistableBundle
~PersistableBundle()
Public static functions
stringAllocator
char *_Nullable stringAllocator( int32_t bufferSizeBytes, void *_Nullable )
