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]  in_bDeleteOnExit  This flag has no effect.

virtual ~CdotXSITemplates (  )  [virtual]

Destructor.


Member Function Documentation

SI_Int GetCount (  ) 

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

Returns:
The number of elements in this hierarchy level.

SI_Int GetTotalCount (  ) 

Returns 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  
)

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

Parameters:
[in]  i_Template  Pointer to the object to add to this container.
[in]  i_nPosition  Position in which to add the item. To specify the current position, use -1 (default).

SI_Void Item ( SI_Int  i_nPosition,
CdotXSITemplate **  o_Template  
)

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

Parameters:
[in]  i_nPosition  Position of the item to receive.
[out]  o_Template  Pointer where the reference to the item will be stored (or NULL if i_nPosition is invalid).

CdotXSITemplate* Item ( SI_Int  i_nPosition  ) 

Returns the specified element. 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:
[in]  i_nPosition  Position of the item to receive.
Returns:
Item at position i_nPosition (or NULL if i_nPosition is invalid).

SI_Void Remove ( SI_Int  i_nPosition  ) 

Removes the specified element.

Parameters:
[in]  i_nPosition  The position of the element to remove. If i_nPosition is invalid, nothing is removed.

SI_Void Clear (  ) 

Removes all elements from the container.

SI_Bool IsSupported ( CSIBCString i_sName,
SI_Int &  o_nInd  
)

Checks to see if a template of the given type name is a member of this container.

Parameters:
[in]  i_sName  Type name of the template to search for.
[out]  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.
Return values:
SI_Bool::TRUE  if a template with the given type name was found
SI_Bool::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 matches the value passed in i_sTemplateName, and whose instance name matches the value specified in i_sInstanceName.

Parameters:
[in]  i_sTemplateName  The type name of the template to find. (Required).
[in]  i_sInstanceName  The instance name of the template to find. (Required).
[out]  o_pTemplate  Pointer where the reference to the item will be stored (or NULL if no item is found).
Return values:
SI_Bool::TRUE  if a template matching the given parameters was found
SI_Bool::FALSE  otherwise

CdotXSITemplate* FindByType ( CSIBCString  in_name  ) 

Searches all templates contained within this container for a CdotXSITemplate that has a type name matching the values specified in in_name.

Parameters:
[in]  in_name  Type name of the template to search for.
Returns:
First template within this container whose type name matches the in_name parameter (or 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 the specified type name.

Parameters:
[in]  in_type  Type name of the elements to put in the new container.
Returns:
Pointer to the new container created. If no elements match the specified type name, the container is empty (but still valid).

SI_Void MoveChild ( int  in_iTemplate,
int  in_iNewPos  
)

Reorders the children inside the template container

Parameters:
[in]  in_iTemplate  the position of the template to move (its old index)
[in]  in_iNewPos  the position to move the template to (its new index)


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