Couchbase Lite
Objective-C API for iOS and Mac OS
CBLDynamicObject.h File Reference
#import <Foundation/Foundation.h>

Go to the source code of this file.

Classes

class  CBLDynamicObject
 A generic class with runtime support for dynamic properties. More...
 

Functions

BOOL CBLGetPropertyInfo (Class cls, NSString *propertyName, BOOL setter, Class *declaredInClass, const char **propertyType)
 Given an Objective-C class object, a property name, and a BOOL for whether the property should be readwrite, return YES if a property with the name exists , NO otherwise. More...
 
Class CBLClassFromType (const char *propertyType, Class relativeToClass)
 Given an Objective-C property type string, returns the property type as a Class object, or nil if a class does not apply or no such property is present. More...
 
Protocol * CBLProtocolFromType (const char *propertyType, Class relativeToClass)
 Same as MYClassFromType, except for protocols. More...
 

Function Documentation

◆ CBLGetPropertyInfo()

BOOL CBLGetPropertyInfo ( Class  cls,
NSString *  propertyName,
BOOL  setter,
Class *  declaredInClass,
const char **  propertyType 
)

Given an Objective-C class object, a property name, and a BOOL for whether the property should be readwrite, return YES if a property with the name exists , NO otherwise.

If setter argument is YES but property is declared readonly, also returns NO. Information about the property is returned by reference: the subclass of cls that declares the property, and the property string part of the property attributes string.

◆ CBLClassFromType()

Class CBLClassFromType ( const char *  propertyType,
Class  relativeToClass 
)

Given an Objective-C property type string, returns the property type as a Class object, or nil if a class does not apply or no such property is present.

See Property Type String section of the Objective-C Runtime Programming Guide for more information about the format of the string.

◆ CBLProtocolFromType()

Protocol* CBLProtocolFromType ( const char *  propertyType,
Class  relativeToClass 
)

Same as MYClassFromType, except for protocols.