GenericEnumValue: Create an enumerated value for an anonymous enumeration...

View source: R/aclassesEnums.R

GenericEnumValueR Documentation

Create an enumerated value for an anonymous enumeration definition

Description

When an enumeration is defined in with no name, such as enum {A, B, C}, then we do not generate a class in R corresponding to this type. Instead, we just create the R variables corresponding to the individual enmeration elements/symbols and we identify them as being of class EnumValue-class. This function creates such an instance.

It can also be used to create an instance of a particular class of EnumValue-class.

Usage

GenericEnumValue(name, val, class = "EnumValue", S3 = FALSE)

Arguments

name

the symbolic name for the constant

val

the numeric value for the constant

class

the specific class for the enumeration type and collection.

S3

currently ignored. Related to using S3 classes.

Value

An object of a class derived from class, typically specific to the enumeration type.

Author(s)

Duncan Temple Lang


omegahat/RAutoGenRunTime documentation built on Jan. 12, 2023, 9:19 p.m.