SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
BaseVariable Class Reference

Inherits NSObject, and <Variable>.

Inherited by MMOItemVariable, SFSBuddyVariable, SFSRoomVariable, and SFSUserVariable.

Instance Methods

(id) - initWithName:value:type:
 
(id) - getValue
 
(BOOL) - getBoolValue
 
(NSInteger) - getIntValue
 
(NSNumber *) - getDoubleValue
 
(NSString *) - getStringValue
 
(id< ISFSObject >) - getSFSObjectValue
 
(id< ISFSArray >) - getSFSArrayValue
 
(BOOL) - isNull
 
(id< ISFSArray >) - toSFSArray
 

Class Methods

(id) + variableWithName:value:type:
 
(id) + variableWithName:value:
 

Protected Attributes

NSString * _name
 
NSString * _type
 
id _value
 

Properties

NSString * name
 
NSString * type
 

Method Documentation

◆ getBoolValue

- (BOOL) getBoolValue

The Variable value as BOOL

◆ getDoubleValue

- (NSNumber *) getDoubleValue

The Variable value as Number

◆ getIntValue

- (NSInteger) getIntValue

The Variable value as NSInteger

◆ getSFSArrayValue

- (id< ISFSArray >) getSFSArrayValue

The Variable value as SFSArray

◆ getSFSObjectValue

- (id< ISFSObject >) getSFSObjectValue

The Variable value as SFSObject

See also
SFSObject

◆ getStringValue

- (NSString *) getStringValue

The Variable value as NSString

◆ getValue

- (id) getValue

The Variable value

◆ isNull

- (BOOL) isNull

Checks if the variable value is null

◆ variableWithName:value:type:

+ (id) variableWithName: (NSString *)  name
value: (id)  value
type: (NSInteger)  type 
Parameters
namethe name of the variable
valuethe variable value ( can be BOOL, Integer, Double, String, SFSObject, SFSArray )
type(optional -1) it's usually not necessary to pass this parameter as the variable value is auto-detected

Reimplemented in SFSBuddyVariable, SFSRoomVariable, MMOItemVariable, and SFSUserVariable.

Property Documentation

◆ name

- (NSString *) name
readnonatomicassign

The Variable name

◆ type

- (NSString *) type
readnonatomicassign

The Variable Type

See also
VariableType