Relational Algebra Engine
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
attribute.h File Reference
#include <stddef.h>
Include dependency graph for attribute.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Attribute
 

Enumerations

enum  AttributeType {
  ATTR_INT , ATTR_DOUBLE , ATTR_STRING , ATTR_SET ,
  ATTR_UNKNOWN
}
 

Functions

Attribute * attribute_create (const char *name, AttributeType type, void *value)
 Create a new Attribute.
 
void attribute_destroy (Attribute *attr)
 Destroy an Attribute and free its memory.
 
void attribute_print (const Attribute *attr)
 Print an Attribute to stdout.
 

Enumeration Type Documentation

◆ AttributeType

Enumerator
ATTR_INT 
ATTR_DOUBLE 
ATTR_STRING 
ATTR_SET 
ATTR_UNKNOWN 

Function Documentation

◆ attribute_create()

Attribute * attribute_create ( const char *  name,
AttributeType  type,
void *  value 
)

Create a new Attribute.

Parameters
nameName of the attribute (copied).
typeType of the attribute (see AttributeType).
valuePointer to the value (ownership is taken).
Returns
Pointer to the new Attribute, or NULL on failure.

◆ attribute_destroy()

void attribute_destroy ( Attribute *  attr)

Destroy an Attribute and free its memory.

Parameters
attrPointer to the Attribute to destroy. Safe to pass NULL.

◆ attribute_print()

void attribute_print ( const Attribute *  attr)

Print an Attribute to stdout.

Parameters
attrPointer to the Attribute to print.