| IGLib 1.4 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions

# IG::Lib::ArrayDto< ElementType, ElementDtoType > Class Template Reference

Data transfer object for holding arrays of objects of the same type. More...

Inheritance diagram for IG::Lib::ArrayDto< ElementType, ElementDtoType >:
[legend]
Collaboration diagram for IG::Lib::ArrayDto< ElementType, ElementDtoType >:
[legend]

List of all members.

## Public Member Functions
| ArrayDto ()
| Default constructor, sets IsNull to true.
| ArrayDto ()
| Default constructor, sets IsNull to true.
override ElementType[] | CreateObject ()
| Creates the array of objects and returns it. The created array has the same dimension as the number of elements of the current DTO, or is null as specified by the current DTO (i.e. GetNull() = true).
## Static Public Member Functions
static void | ExampleVectorArray (string filePath)
| An example of using the ArrayDto for storing an array of vecctors into a JSON file.
## Public Attributes
ElementDtoType[] | Elements
## Protected Member Functions
override void | CopyFromPlain (ElementType[] obj)
| Copies data from the specified array object. All elements are copied to appropriate DTOS on the array of elements (internal variable Elements).
override void | CopyToPlain (ref ElementType[] obj)
| Copies data from the current DTO to the specified array objects. All data of contained elements is copied to elements of the array.Array is created anew / resized if necessary.

## Detailed Description

### template<ElementType, ElementDtoType>
class IG::Lib::ArrayDto< ElementType, ElementDtoType >

Data transfer object for holding arrays of objects of the same type.

Template Parameters:

  ElementType | Type of elements.
  ElementDtoType | Type of a DTO that is used to trasfer element data.

$A Igor Jul09;

Template Parameters:

  ElementType | Type of elements.
  ElementBaseType | Base type of elements.
  ElementDtoType | Type of a DTO that is used to trasfer element data.

$A Igor Jul09;

Type Constraints

  ElementType | : | class |
  ElementDtoType | : | SerializationDtoBase |
  ElementDtoType | : | ElementType |
  ElementDtoType | : | ElementType |
  ElementDtoType | : | new() |

## Member Function Documentation

template<ElementType , ElementDtoType >

IG::Lib::ArrayDto< ElementType, ElementDtoType >::ArrayDto | ( |  | ) | `[inline]`

Default constructor, sets IsNull to true.

template<ElementType , ElementDtoType >

IG::Lib::ArrayDto< ElementType, ElementDtoType >::ArrayDto | ( |  | ) | `[inline]`

Default constructor, sets IsNull to true.

template<ElementType , ElementDtoType >

override ElementType [] IG::Lib::ArrayDto< ElementType, ElementDtoType >::CreateObject | ( |  | ) | `[inline, virtual]`

Creates the array of objects and returns it. The created array has the same dimension as the number of elements of the current DTO, or is null as specified by the current DTO (i.e. GetNull() = true).

Returns:

Implements IG::Lib::SerializationDtoBase< Type, BaseType >.

template<ElementType , ElementDtoType >

override void IG::Lib::ArrayDto< ElementType, ElementDtoType >::CopyFromPlain | ( | ElementType[] | obj | ) | `[inline, protected]`

Copies data from the specified array object. All elements are copied to appropriate DTOS on the array of elements (internal variable Elements).

Parameters:

  obj | Object that data is copied form.

template<ElementType , ElementDtoType >

override void IG::Lib::ArrayDto< ElementType, ElementDtoType >::CopyToPlain | ( | ref ElementType[] | obj | ) | `[inline, protected]`

Copies data from the current DTO to the specified array objects. All data of contained elements is copied to elements of the array.Array is created anew / resized if necessary.

Parameters:

  obj | Objects that data are copied to.

template<ElementType , ElementDtoType >

static void IG::Lib::ArrayDto< ElementType, ElementDtoType >::ExampleVectorArray | ( | string | filePath | ) | `[inline, static]`

An example of using the ArrayDto for storing an array of vecctors into a JSON file.

Parameters:

  savePath | Path of the file to which vectors are saved. Must not be null or empty string. If the file already exists then user is promped whether to store vectors or not.

## Member Data Documentation

template<ElementType , ElementDtoType >

ElementDtoType [] IG::Lib::ArrayDto< ElementType, ElementDtoType >::Elements

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

- ArrayDto.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events