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

- Main Page
- Namespaces
- Classes
- Files

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events
Public Member Functions | Properties | List of all members
IG.Lib.IObjectStore< T > Interface Template Reference

Object store. Objects of the specified type can be stored here for later reuse (efficiency improvement).

Template Parameters

  T | Type of objects to be stored, must be a reference type.

More...
Inheritance diagram for IG.Lib.IObjectStore< T >:
[legend]

## Public Member Functions
bool | IsEligible (T obj)
| Returns true if the specified object is eligible for storing in this object storage, false if it is not. More...
bool | TryStore (T obj)
| Stores the specified object if the object is eligible for storage in this store and if The maximal number of stored object will not be exceeded. More...
bool | StoreEligible (T obj)
| Stores the specified object in the store. Throws ArgumentException if the specified object is not eligible for storing in this store. If the maximum number of objects would be exceeded then nothing happens. More...
T | TryGet ()
| Returns an object from this object store, or null if it is not possible to provide an eligible object. If the store contains no objects, it tries to create and return a new eligible object. Should not throw an exception. More...
T | TryGetStored ()
| Returns the last object from this object store, or null if there are no objects on it. Dose not attempt to create a new object. More...
T | GetEligible ()
| Returns a non-null object that is eligible for storing in this object store. If the store itself does not contain any objects, an object is created anew, or exception is thrown if this is not possible. IMPORTANT: TryGet returns an object or null if the object can not be returned (does not throw an exception), and TryGetStored returns an eligible object only if any are stored, otherwise returns null. More...

## Properties
int | Count`[get]`
| Gets the current number of objects. More...
int | MaxCount`[get, set]`
| Gets or sets the maximal number of objects that can be stored by this object store. More...

## Detailed Description

Object store. Objects of the specified type can be stored here for later reuse (efficiency improvement).

Template Parameters

  T | Type of objects to be stored, must be a reference type.

Type Constraints

  T | : | class |

## Member Function Documentation

bool IG.Lib.IObjectStore< T >.IsEligible | ( | T | obj | ) |

Returns true if the specified object is eligible for storing in this object storage, false if it is not.

Implemented in IG.Num.MatrixStore< T >, IG.Num.VectorStore< T >, and IG.Lib.ObjectStore< T >.

bool IG.Lib.IObjectStore< T >.TryStore | ( | T | obj | ) |

Stores the specified object if the object is eligible for storage in this store and if The maximal number of stored object will not be exceeded.

Parameters

  obj | Object to be stored.

Returns
  true if the object has actually been stored, false if not.

Implemented in IG.Lib.ObjectStore< T >.

bool IG.Lib.IObjectStore< T >.StoreEligible | ( | T | obj | ) |

Stores the specified object in the store. Throws ArgumentException if the specified object is not eligible for storing in this store. If the maximum number of objects would be exceeded then nothing happens.

Returns
  true if the object has actually been stored, false if not.

Implemented in IG.Lib.ObjectStore< T >.

T IG.Lib.IObjectStore< T >.TryGet | ( |  | ) |

Returns an object from this object store, or null if it is not possible to provide an eligible object. If the store contains no objects, it tries to create and return a new eligible object. Should not throw an exception.

Implemented in IG.Lib.ObjectStore< T >.

T IG.Lib.IObjectStore< T >.TryGetStored | ( |  | ) |

Returns the last object from this object store, or null if there are no objects on it. Dose not attempt to create a new object.

Implemented in IG.Lib.ObjectStore< T >.

T IG.Lib.IObjectStore< T >.GetEligible | ( |  | ) |

Returns a non-null object that is eligible for storing in this object store. If the store itself does not contain any objects, an object is created anew, or exception is thrown if this is not possible. IMPORTANT: TryGet returns an object or null if the object can not be returned (does not throw an exception), and TryGetStored returns an eligible object only if any are stored, otherwise returns null.

Implemented in IG.Lib.ObjectStore< T >.

## Property Documentation

int IG.Lib.IObjectStore< T >.Count
| get

Gets the current number of objects.

int IG.Lib.IObjectStore< T >.MaxCount
| get set

Gets or sets the maximal number of objects that can be stored by this object store.

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

- igbase/utilities/UtilObjectStore.cs