Version: 8.3.0
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
datamodeler.DataModeler Class Reference

This class is a placeholder for modeling data. More...

Public Member Functions

def __init__
 
def addAttribute
 A None argument means that no entry is created in the associated maps. More...
 
def __setattr__
 
def __getattribute__
 
def log
 

Detailed Description

This class is a placeholder for modeling data.

An object based on this class (particular instance or specialized derived class) can defined attributes with the following properties:

  • a type : the class or the type of the attribute. Setting an attribute to a value whose type is not the specified type raises an exception.
  • a range : a list of the possible values for the attribute. Setting an attribute to a value not in the range raises an exception
  • a default: the default value of an attribute when an instance is created
  • a void flag: the attribute can be authorized to be None or not using this flag. Setting an attribute to a None value while the flag is not set to True raises an exception. By default, a None value is not allowed.

These properties are dictionnaries mapping the attribute name to its associated value for the property.
A typical usage is to derived this class in a specialized form where the attributes names and there properties are defined in the constructor. See use cases at the end of this file.

Member Function Documentation

def datamodeler.DataModeler.addAttribute (   self,
  name,
  type = None,
  range = None,
  default = None,
  void = None 
)

A None argument means that no entry is created in the associated maps.