| chigraph master Systems programming language written for beginners in LLVM

Public Member Functions | Public Attributes | Related Functions | List of all members
chi::NamedDataType Struct Reference

Basicaly a std::pair<std::string, DataType>, except it has nicer names. More...

`#include <chi/DataType.hpp>`

Collaboration diagram for chi::NamedDataType:
[legend]

## Public Member Functions
| NamedDataType (std::string n={}, DataType ty={})
| Construct a NamedDataType from the name and the type. More...
bool | valid () const
| See if the pair is valid. More...

## Public Attributes
std::string | name
| The name.
DataType | type
| The type.

## Related Functions
(Note that these are not member functions.)
bool | operator!= (const NamedDataType &lhs, const NamedDataType &rhs)
| Check if two NamedDataType objects aren't equal. More...
bool | operator== (const NamedDataType &lhs, const NamedDataType &rhs)
| Check if two NamedDataType objects are equal. More...

## Detailed Description

Basicaly a std::pair<std::string, DataType>, except it has nicer names.

Definition at line 72 of file DataType.hpp.

## Constructor & Destructor Documentation

## ◆ NamedDataType()

chi::NamedDataType::NamedDataType | ( | std::string | n = `{}`,
|  | DataType | ty = `{}`
| ) |  |
| inline

Construct a NamedDataType from the name and the type.

Parameters

  n | The name
  ty | The type

Definition at line 76 of file DataType.hpp.

## Member Function Documentation

## ◆ valid()

bool chi::NamedDataType::valid | ( |  | ) | const
| inline

See if the pair is valid.

Returns
  if it's valid

Definition at line 80 of file DataType.hpp.

## Friends And Related Function Documentation

## ◆ operator!=()

bool operator!= | ( | const NamedDataType & | lhs,
|  | const NamedDataType & | rhs
| ) |  |
| related

Check if two NamedDataType objects aren't equal.

Parameters

  lhs | The first type
  rhs | The type to compare to

Returns
  if they aren't equal

Definition at line 103 of file DataType.hpp.

## ◆ operator==()

bool operator== | ( | const NamedDataType & | lhs,
|  | const NamedDataType & | rhs
| ) |  |
| related

Check if two NamedDataType objects are equal.

Parameters

  lhs | The first type
  rhs | The type to compare to

Returns
  if they are equal

Definition at line 94 of file DataType.hpp.

References name, and type.

The documentation for this struct was generated from the following file:

- lib/core/include/chi/DataType.hpp