# CdotXSITemplates Class Reference

Used as a container class for CdotXSITemplate. More...

`#include <dotXSITemplate.h>`

List of all members.

## Public Member Functions
| CdotXSITemplates ()
| CdotXSITemplates (SI_Bool in_bDeleteOnExit)
virtual | ~CdotXSITemplates ()
SI_Int | GetCount ()
SI_Int | GetTotalCount ()
SI_Void | Add (CdotXSITemplate *i_Template, SI_Int i_nPosition=-1)
SI_Void | Item (SI_Int i_nPosition, CdotXSITemplate **o_Template)
CdotXSITemplate * | Item (SI_Int i_nPosition)
SI_Void | Remove (SI_Int i_nPosition)
SI_Void | Clear ()
SI_Bool | IsSupported (CSIBCString *i_sName, SI_Int &o_nInd)
SI_Bool | Find (CSIBCString *i_sTemplateName, CSIBCString *i_sInstanceName, CdotXSITemplate **o_pTemplate)
CdotXSITemplate * | FindByType (CSIBCString in_name)
CdotXSITemplates * | ChildrenOfType (CSIBCString in_type)
SI_Void | MoveChild (int in_iTemplate, int in_iNewPos)

## Detailed Description

Used as a container class for CdotXSITemplate.

This class supports methods for grouping CdotXSITemplate objects together, including indexing of objects, finding objects, etc.

## Constructor & Destructor Documentation

CdotXSITemplates | ( |  | ) |

Default constructor. Creates a CdotXSITemplates object. Sets the m_bDeleteOnExit flag to true by default.

CdotXSITemplates | ( | SI_Bool | in_bDeleteOnExit | ) |

Constructor. Creates a CdotXSITemplates object. Sets the m_bDeleteOnExit flag to the input parameter value

Parameters:

  | in_bDeleteOnExit | This flag has no effect.

virtual ~CdotXSITemplates | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

SI_Int GetCount | ( |  | ) |

Get the number of elements in this particular template hierarchy level.

Returns:
  The number of elements in this heirarchy level.

SI_Int GetTotalCount | ( |  | ) |

Get the total number of elements (recursive, including child templates).

Returns:
  The total number of elements.

SI_Void Add | ( | CdotXSITemplate * | i_Template,
|  | SI_Int | i_nPosition = `-1` |
| ) |  |  |

Add a CdotXSITemplate element to this container, in the specified position.

Parameters:

  | i_Template | Pointer to the object to add to this container.
  | i_nPosition | Position in which to add the item. -1 == Current position. Default of -1.

SI_Void Item | ( | SI_Int | i_nPosition,
|  | CdotXSITemplate ** | o_Template |
| ) |  |  |

Gets the specified element (indirectly). This call is equivalent to Item(SI_Int), except that it stores the return in an out parameter, rather than returning the pointer directly from the function itself.

Parameters:

  | i_nPosition | Position of the item to receive.
  | o_Template | Double pointer to receive the pointer to the item. (NULL if
  | i_nPosition | is invalid).

Returns:
  SI_Void

CdotXSITemplate* Item | ( | SI_Int | i_nPosition | ) |

Get the specified element (directly). This call is equivalent to Item(SI_Int, CdotXSITemplate **), except that it returns the pointer directly from the function instead of storing the return in an out parameter.

Parameters:

  | i_nPosition | Position of the item to receive.

Returns:
  CdotXSITemplate Item at position

Parameters:

  | i_nPosition. | (NULL if
  | i_nPosition | is invalid).

SI_Void Remove | ( | SI_Int | i_nPosition | ) |

Remove the specified element.

Parameters:

  | i_nPosition | The position of the element to remove. If
  | i_nPosition | is invalid, nothing is removed.

Returns:
  SI_Void

SI_Void Clear | ( |  | ) |

Removes all elements from the container.

Returns:
  SI_Void

SI_Bool IsSupported | ( | CSIBCString * | i_sName,
|  | SI_Int & | o_nInd |
| ) |  |  |

Checks whether a template of a given type name is contained within this container.

Parameters:

  | i_sName | Type name of the template to search for.
  | o_nInd | Set to the position of the first element of the type given by
  | i_sName. | If none was found, this parameter is set to -1.

Returns:
  SI_Bool TRUE if a template with the given type name was found, FALSE otherwise.

SI_Bool Find | ( | CSIBCString * | i_sTemplateName,
|  | CSIBCString * | i_sInstanceName,
|  | CdotXSITemplate ** | o_pTemplate |
| ) |  |  |

Searches all templates, and all children of templates contained within this container for a CdotXSITemplate whose type name is given by `i_sTemplateName`, and whose instance name is given by `i_sInstanceName`.

Parameters:

  | i_sTemplateName | The type name of the template to find. (Required).
  | i_sInstanceName | The instance name of the template to find. (Required).
  | o_pTemplate | Double pointer to receive the pointer to the item. If no item is found this parameter is set to NULL.

Returns:
  SI_Bool TRUE if a template matching the given parameters was found, FALSE otherwise.

CdotXSITemplate* FindByType | ( | CSIBCString | in_name | ) |

Search all templates contained within this container for a CdotXSITemplate that has a type name of `in_name`.

Parameters:

  | in_name | Type name of the template to search for.

Returns:
  CdotXSITemplate * First template within this container whose type name matchs the `in_name` parameter. (NULL if there is no match).

CdotXSITemplates* ChildrenOfType | ( | CSIBCString | in_type | ) |

Creates a new container object that contains all elements within this container that have a type name that matches `in_type`

Parameters:

  | in_type | Type name of the elements to put in the new container.

Returns:
  CdotXSITemplates Pointer to the new container created. If no elements match the type name given type `in_type`, the container is empty (but is still valid).

SI_Void MoveChild | ( | int | in_iTemplate,
|  | int | in_iNewPos |
| ) |  |  |

Reorders the children template

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

- dotXSITemplate.h