codeable_models.CAttribute¶
-
class
codeable_models.CAttribute(**kwargs)¶ CAttributeis internally used for storing attributes, and can be used by the user for detailed setting or introspection of attribute data.The
attributesgetter ofCClassifierreturnsCAttributeobjects. They can be used as an alternative method in theattributessetter ofCClassifierto define attributes of a classifier.- Parameters
**kwargs –
CAttributeaccepts:type,default.The
typekwarg accepts a type argument in the form acceptable to thetypeproperty.The
defaultkwarg accepts a default value in the form acceptable to thedefaultproperty.
-
property
classifier¶ Property used to get the classifier of the attribute.
The attribute classifier is set automatically when the attribute is created on a classifier.
- Type
-
property
default¶ Property used to set or get the default value of the attribute.
If an attribute type is set before the default value, the default value must conform to the type. Else the type is guessed from the provided default value.
- Type
default_value
-
property
name¶ Property used to get the name of the attribute.
Will be set automatically if the attribute is created on a classifier.
- Type
str
-
property
type¶ Property used to set or get the type of the attribute.
If a default value is set before the type, an exception will be raised if the new type does not match the default value.
Supported types of attributes are documented in the documentation of the
attributesproperty ofCClassifier.- Type
supported_type