Pool class (Swimlane)

Pool(oPools, oPoolOptsopt)

new Pool(oPools, oPoolOptsopt)

The Pool object holds information(options) about a pool within the control. A pool is a container that organizes elements using lanes and phases. Lanes divide the pool horizontally, while phases divide it vertically. Pools are displayed as rectangles on the control, while lanes and phases appear as subdivisions within the pool. Elements can be assigned to a specific lane and phase so they are displayed within the corresponding section of the pool. Almost all properties of a pool refer to the pool itself. To access the elements contained within the pool, including those in its inner-pools (recursively), you can use the Pool.Objects property.

Every option of the PoolOptions type has associated a property of the Pool object. For instance, the option:

cursor {string}, defines the mouse-cursor for individual pool
is associated with the property:
Cursor {string}, defines the mouse-cursor for individual pool
which means that the following statements are equivalent:
oPool.Options = {cursor: "pointer"}
oPool.SetOptions({cursor: "pointer"})
oPool.Cursor = "pointer"
oPool.SetCursor("pointer")
where oPool is an object of Pool type.
Parameters:
Name Type Attributes Description
oPools Pools Indicates an object of Pools type that's the owner collection of this pool.
oPoolOpts object <optional>
Defines the pool's options as an object of PoolOptions type.

Members

Client :any

The Client property defines the pool's client area as an array in the format [x, y, width, height]. This rectangle defines the position and size of the pool on the control. A pool is displayed as a rectangle on the surface, and the Client property determines the area available for the pool's content. The Headers property defines the pool's headers using a string representation. The Client area includes the space occupied by all headers, meaning that the total rectangle of the pool accounts for both the content area and the headers.

The setter of the Client property can accept any of the following values:

  • {number[]}, specifies the pool's client area as an array of [x,y,width,height] type
  • {null}, specifies the union all visible-elements (collapsed child-elements or hidden elements are ignored) (@since 2.0)
  • {Elements[]}, specifies the union of the giving visible-elements (collapsed child-elements or hidden elements are ignored). For instance, oPool.SetClient(oControl.Elements) changes the pool's client-rectangle to cover all visible-elements, while oPool.SetClient(oControl.Selection) changes the pool's client-rectangle to cover the selection (@since 2.0)
  • {String[]}, specifies the union of the giving keys of the visible-elements (collapsed child-elements or hidden elements are ignored). For instance, oPool.SetClient(["A","B"]) changes the pool's client-rectangle to cover the elements with the key "A" and "B" (@since 2.0)
  • {Element}, indicates the element's client-rectangle (@since 2.0)

The getter of the Client property returns the pool's client area as an array in the format [x, y, width, height].

Type:
  • any
Example
The following statements are equivalent:

 oPool.Client = [10, 20, 200, 100], sets the pool's client area to the rectangle defined by x=10, y=20, width=200, and height=100
 oPool.SetClient([10, 20, 200, 100]), sets the pool's client area to the rectangle defined by x=10, y=20, width=200, and height=100

where oPool is an object of Pool type
Client

Cursor :any

The Cursor property defines the mouse cursor for an individual pool. It can be set to any valid CSS cursor value, such as "pointer", "default", "move", "crosshair", and so on. By specifying a custom cursor for a pool, you provide visual feedback to users about the interactivity of the pool. For example:
  • Setting the cursor to "pointer" can indicate that the pool is clickable
  • Setting the cursor to "move" can suggest that the pool can be dragged

This property enhances the user experience by clearly indicating how users can interact with different pools on the surface control. The Cursors property can be used to define default cursor values for various parts of the control.

Type:
  • any
Example
The following statements are equivalent:

 oPool.Cursor = "pointer", sets the mouse cursor to "pointer" when hovering over the pool
 oPool.SetCursor("pointer"), sets the mouse cursor to "pointer" when hovering over the pool

where oPool is an object of Pool type
Cursor

Enabled :boolean

The Enabled property enables or disables the pool. Disabling the pool affects only the pool itself (its client area and headers), not the elements it contains. When disabled, the pool is displayed using disabled colors.The Element.Enabled property enables or disables the element itself, while the Pool.Enabled property enables or disables the pool without affecting its elements.
Type:
  • boolean
Example
The following statements are equivalent:

 oPool.Enabled = false, disables the pool
 oPool.SetEnabled(false), disables the pool

where oPool is an object of Pool type
Enabled

ExcludeHeaders :boolean

The ExcludeHeaders property includes or excludes the pool's headers into the pool's lanes and phases. The Headers property specifies the pool's headers using a string representation. When ExcludeHeaders is set to false, the lanes and phases can extend over the headers and may overlap them. When ExcludeHeaders is set to true, the lanes and phases are restricted to the pool's client area and are not displayed over the headers, ensuring that the headers remain visible and unobstructed.
Type:
  • boolean
Example
The following statements are equivalent:

 oPool.ExcludeHeaders = true, prevents the pool's lanes and phases from being displayed over the pool's headers
 oPool.SetExcludeHeaders(true), prevents the pool's lanes and phases from being displayed over the pool's headers

where oPool is an object of Pool type
ExcludeHeaders

Headers :string

The Headers property defines the pool's headers using a string representation. Headers are displayed around the pool's client area and can be anchored to any of the four sides: left, top, right, or bottom. Each header can have its own attributes, such as size and shape, allowing full customization of both the appearance and layout of the pool's headers. The Phases property defines the pool's phases, which run horizontally from left to right, while the Lanes property defines the pool's lanes, which run vertically from top to bottom. The ExcludeHeaders property specifies whether the lanes and phases are prevented from overlapping the pool's headers, ensuring that the layout respects the header areas and avoids visual conflicts.

The format of the property is:

"type[flag=value]...[flag=value],...,type[flag=value]...[flag=value]"
where:
  • "type", defines the type of the header, which can be any of the following
    • "left", defines the pool's header anchored to the left-side
    • "top", defines the pool's header anchored to the top-side
    • "right", defines the pool's header anchored to the right-side
    • "bottom", defines the pool's header anchored to the right-side
  • "flag", defines a property of the header such as:
    • [size=value], defines the size of the header, where value is a numeric value
    • [shape=value], defines the shape of the header.
Type:
  • string
Example
null {null}, defines no visible headers, but the user can resize and show them, equivalent with "left[size=0],right[size=0],top[size=0],bottom[size=0]".
"" {string}, defines no visible headers.
"left[size=24][shape=Button],top[size=24]", shows the left and top-headers of the pool with specified size and shape.
Headers

(readonly) Index :number

The Index property gets the pool's index, a zero-based number representing the pool's order within the control. The first pool has an index of 0, the second an index of 1, and so on. The index can be used to reference a specific pool, for example, with Pools.Item(index). A pool's index is determined by its position in the control's pools collection and may change if pools are added or removed. Unlike the Position property, which indicates the pool's stacking order (the visual layering of pools), the Index property provides a more stable reference for identifying a pool within the control.
Type:
  • number
Example
The following statements are equivalent:

 oPool.GetIndex() {number}, retrieves the pool's index
 oPool.Index {number}, retrieves the pool's index

where oPool is an object of Pool type
Index

Key :string

The Key property defines the key associated with the pool. If no key is provided, the pool can be referenced using its plain-caption, which excludes any ex-HTML tags such as <b>, <fgcolor>, and others. Using the Key property is recommended to ensure the pool can be reliably identified even if its caption changes. The Element.Key property specifies the key associated with an element, while the Pool.Key property specifies the key associated with a pool.
Type:
  • string
Example
The following statements are equivalent:

 oPool.Key = "pool", specifies the key associated with the pool
 oPool.SetKey("pool"), specifies the key associated with the pool

where oPool is an object of Pool type
Key

Lanes :string

The Lanes property defines the pool's lanes using a string representation. Lanes divide the pool into horizontal sections and extend vertically from the top to the bottom side of the pool. Lanes are used to group elements within the pool, and each lane can define its own attributes, such as size and shape, allowing customization of the lanes' appearance and layout. The Phases property defines the pool's phases, which run horizontally from the left to the right side of the pool. The Headers property defines the pool's headers, which can be anchored to any of the four sides: left, top, right, or bottom.

The format of the property is:

"caption[flag=value]...[flag=value],...,caption[flag=value]...[flag=value]"
where:
  • "caption", defines the lane's ex-HTML caption (shown into the pool's header)
  • "flag", defines a property of the lane such as:
    • [size=value], defines the size of the lane (in percent), where value is a numeric value. 0 or negative value hides the lane
    • [shape=value], defines the shape of the lane.
Type:
  • string
Example
The following statements are equivalent:

 oPool.Lanes = "lane1[size=50],lane2[size=50]", defines two lanes with caption "lane1" and "lane2", each one with size of 50% of the pool's height
 oPool.SetLanes("lane1[size=50],lane2[size=50]"), defines two lanes with caption "lane1" and "lane2", each one with size of 50% of the pool's height

where oPool is an object of Pool type
Lanes

Objects :array

The Objects property gets the pool and all objects it contains, including elements and inner-pools. A pool acts as a container, so when the pool is moved, all contained objects move together with it. The method returns all elements and inner-pools that belong to the pool recursively, meaning it also includes the objects contained in any inner-pools. The returned collection therefore includes the pool itself as well as all objects that fit within its structure.
Type:
  • array
Example
The following samples remove all objects that fit the first pool of the swimlane:

 oSwimlane.Pool(0).Objects.forEach(function(oObject)
 {
   oObject.Remove();
 })

where oSwimlane is an object of Swimlane type
Objects

Options :PoolOptions

The Options property defines the options of the current pool. A pool is a container that organizes elements using lanes and phases: lanes divide the pool horizontally, while phases divide it vertically. Pools are displayed as rectangles on the control, with lanes and phases shown as subdivisions within the pool. Elements can be assigned to a specific lane and phase so they appear in the corresponding section. Most pool properties refer to the pool itself, while the Pool.Objects property allows access to all elements contained within the pool, including those in nested inner pools, recursively.

Every option of the PoolOptions type has associated a property of the Pool object. For instance, the option:

cursor {string}, defines the mouse-cursor for individual pool
is associated with the property:
Cursor {string}, defines the mouse-cursor for individual pool
which means that the following statements are equivalent:
oPool.Options = {cursor: "pointer"}
oPool.SetOptions({cursor: "pointer"})
oPool.Cursor = "pointer"
oPool.SetCursor("pointer")
where oPool is an object of Pool type.
Type:
Example
The following object defines a pool with left and top headers and a few lanes and phases: 

 {
  headers: "left[size=24],top[size=24]",
  lanes: "L1[size=20],L2,L3,L4[shape=FrameSel]",
  phases: "P1[size=20],P2,P3[shape=FrameSel]"
 }

equivalent to the following statements:

 oPool.SetHeaders("left[size=24],top[size=24]");
 oPool.SetLanes("L1[size=20],L2,L3,L4[shape=FrameSel]");
 oPool.SetPhases("P1[size=20],P2,P3[shape=FrameSel]");

where oPool is an object of Pool type
Options

Phases :string

The Phases property defines the phases of the pool using a string representation. Phases divide the pool into vertical sections and extend horizontally from the left to the right side of the pool. Phases are used to group elements within the pool, and each phase can define its own attributes, such as size and shape, allowing customization of the phases' appearance and layout. The Lanes property defines the pool's lanes, which run vertically from top to bottom, while the Headers property defines the pool's headers, which can be anchored to any of the four sides: left, top, right, or bottom.

The format of the property is:

"caption[flag=value]...[flag=value],...,caption[flag=value]...[flag=value]"
where:
  • "caption", defines the phase's ex-HTML caption (shown into the pool's header)
  • "flag", defines a property of the phase such as:
    • [size=value], defines the size of the phase (in percent), where value is a numeric value. 0 or negative value hides the phase
    • [shape=value], defines the shape of the phase.
Type:
  • string
Example
null {null}, displays no phases for the pool
"Phase 1,Phase 2", displays two-phases for the pool named Phase 1 and Phase 2
"Phase 1[size=20],Phase 2,Phase 3,Phase 4[shape=FrameSel]", displays four-phases where Phase 1 takes 20% from the pool, while the rest of phases shares equaly the available space on the pool. The Phase 4 displays the FrameSel shape.
Phases

Position :number

The Position property defines the pool's position. The position is a zero-based number that indicates the pool's stacking order within the control. The first pool has a position of 0, the second a position of 1, and so on. The position determines the visual layering of pools, with higher-positioned pools appearing in front of lower-positioned ones. The position can be changed using this method or by using methods like BringToFront(), SendToBack(), and others that adjust the pool's stacking order. The Index property, on the other hand, provides a more stable reference for identifying a pool within the control, as it is based on the pool's order in the collection rather than its visual layering. Pools are displayed on the control's background, while elements and links appear in the foreground. As a result, changing a pool's position (its visual stacking order) does not affect the position of the elements or links contained within that pool.
Type:
  • number
Example
0 {number}, moves the pool to the bottom of the stacking order, so that it is behind the other pools
1 {number}, moves the pool up one level, so that it is closer to top of the stacking order
n {number}, where n is a zero-based number that indicates the pool's new position within the stacking order. The first pool has a position of 0, the second a position of 1, and so on.
Position

Shape :any

The Shape property defines the visual shape of an individual pool. It determines the appearance of the pool's client area, which contains the pool's elements, excluding the pool's headers. If the Shape property is not specified, the Shapes property provides default visual appearances for various parts of the control, including all pools:
  • "pool", defines the visual-appearance of all pools within the control
  • "header", defines the visual-appearance of all headers within the control
  • "lane", defines the visual-appearance of all lanes for all pools
  • "laneAlt", defines the visual-appearance of alternate lanes for all pools
  • "phase", defines the visual-appearance of all phases for all pools
  • "phaseAlt", defines the visual-appearance of alternate phases for all pools

The Shape property can be any of the following:

  • {null}, no custom-shape is applied
  • the shape's name within the exontrol.Shapes.Swimlane or exontrol.Shapes namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
Type:
  • any
Example
The following statements are equivalent:
 
 oPool.Shape = "red", sets the pool's background color to red
 oPool.SetShape("red"), sets the pool's background color to red

where oPool is an object of Pool type
Shape

Visible :boolean

The Visible property shows or hides the pool. The Visible property does not hide the pool's elements; it hides only the pool itself (the pool's client area and its headers). If the pool is hidden, its elements remain visible and are displayed as if the pool does not exist. The Element.Visible property shows or hides the element itself, while the Pool.Visible property shows or hides the pool (its client area and headers) without affecting the visibility of the elements it contains.
Type:
  • boolean
Example
The following statements are equivalent:

 oPool.Visible = false, hides the pool
 oPool.SetVisible(false), hides the pool

where oPool is an object of Pool type
Visible

Methods

BringForward() → {number}

The BringForward() method moves the pool up one level, so that it is closer to top of the stacking order. The position is a zero-based number that indicates the pool's stacking order within the control. The first pool has a position of 0, the second a position of 1, and so on. The position determines the visual layering of pools, with higher-positioned pools appearing in front of lower-positioned ones. The position can be changed using this method or by using methods like BringToFront(), SendToBack(), and others that adjust the pool's stacking order. The Index property, on the other hand, provides a more stable reference for identifying a pool within the control, as it is based on the pool's order in the collection rather than its visual layering. Pools are displayed on the control's background, while elements and links appear in the foreground. As a result, changing a pool's position (its visual stacking order) does not affect the position of the elements or links contained within that pool.
Returns:
Returns the pool's previously position
Type
number
Example
BringForward(), moves the first pool up one level, so that it is closer to top of the stacking order
BringForward

BringToFront() → {number}

The BringToFront() method moves the pool to the top of the stacking order, so that it is in front of other pools. The position is a zero-based number that indicates the pool's stacking order within the control. The first pool has a position of 0, the second a position of 1, and so on. The position determines the visual layering of pools, with higher-positioned pools appearing in front of lower-positioned ones. The position can be changed using this method or by using methods like SendToBack(), SendBackward(), and others that adjust the pool's stacking order. The Index property, on the other hand, provides a more stable reference for identifying a pool within the control, as it is based on the pool's order in the collection rather than its visual layering. Pools are displayed on the control's background, while elements and links appear in the foreground. As a result, changing a pool's position (its visual stacking order) does not affect the position of the elements or links contained within that pool.
Returns:
Returns the pool's previously position
Type
number
Example
BringToFront(), moves the first pool to the top of the stacking order, so that it is in front of other pools
BringToFront

EndUpdatePool(startUpdatePool)

The EndUpdatePool() method adds programmatically updated properties of the pool to undo/redo queue. You can use the StartBlockUndoRedo / EndBlockUndoRedo methods to group multiple Undo/Redo operations into a single-block. The AllowUndoRedo property specifies whether the control supports undo/redo operations for objects (pools, links, ...). No entry is added to the Undo/Redo queue if no property is changed for the current pool. The UpdatePool() method automatically calls StartBlockUndoRedo / EndBlockUndoRedo methods, so you don't need to call them explicitly when using the UpdatePool() method to update the pool's properties.
Parameters:
Name Type Description
startUpdatePool array Holds the result of a StartUpdatePool() method, as an array of [{o(bject), c(opy)o(bject)O(ptions)}] type, as explained: o(bject) {object}, specifies the object to start recording updating the properties (could be an element or a pool) c(opy)o(bject)O(ptions) {object}, specifies the object's creation-options.
Since:
  • 2.0
Example
The following statements are equivalent:
 
 var oStartPoolUpdate = oPool.StartUpdatePool(); // {object} holds undefined (no undo-redo supported) or a copy of the pool's properties
 // ... changes properties of the pool programmatically
 oPool.EndUpdatePool(oStartPoolUpdate);

or

 oPool.UpdatePool(function()
 {
  // ... changes properties of the pool programmatically
 });

where oPool is an object of Pool type
EndUpdatePool

EnsureVisible()

The EnsureVisible() method scrolls the control's content so that the pool becomes visible within the control's client area. This ensures that the entire pool, or as much of it as possible, is brought into view. The Client property of the pool specifies the pool's rectangular area within the control, using its position and size. The EnsureVisibleClient() method of the control's view scrolls the control's content so that a specified rectangular area fits within the control's client area. This method is used internally by EnsureVisible() to adjust the view and make the pool visible.
Since:
  • 2.0
Example
oSwimlane.Pool(0).EnsureVisible(), scrolls the control's content so the first pool fits the control's client area
EnsureVisible

Lane(lane) → {PoolSplitter}

The Lane() method gets the lane of the pool giving its identifier. Lanes divide the pool into horizontal sections and extend vertically from the top to the bottom side of the pool. Lanes are used to group elements within the pool, and each lane can define its own attributes, such as size and shape, allowing customization of the lanes' appearance and layout. The Phases property defines the pool's phases, which run horizontally from left to right, while the Headers property defines the pool's headers, which can be anchored to any of the four sides: left, top, right, or bottom.
Parameters:
Name Type Description
lane any The lane parameter could be any of the following:
  • lane {number}, indicates a numeric value that defines the index of the lane
  • lane {string}, specifies the caption of the lane
  • lane {PoolSplitter}, specifies an object of {PoolSplitter} type
Since:
  • 1.8
Returns:
Returns null (if no pool, lane with giving identifiers)
Type
PoolSplitter

Phase(phase) → {PoolSplitter}

The Phase() method gets the phase of the pool giving its identifier. Phases divide the pool into vertical sections and extend horizontally from the left to the right side of the pool. Phases are used to group elements within the pool, and each phase can define its own attributes, such as size and shape, allowing customization of the phases' appearance and layout. The Lanes property defines the pool's lanes, which run vertically from top to bottom, while the Headers property defines the pool's headers, which can be anchored to any of the four sides: left, top, right, or bottom.
Parameters:
Name Type Description
phase any The phase parameter could be any of the following:
  • phase {number}, indicates a numeric value that defines the index of the phase
  • phase {string}, specifies the caption of the phase
  • phase {PoolSplitter}, specifies an object of {PoolSplitter} type
Since:
  • 1.8
Returns:
Returns null (if no pool, phase with giving identifiers)
Type
PoolSplitter

Remove()

The Remove() method removes the pool itself from its collection. Deleting a pool does not delete the elements and inner-pools it contains. The Pool.Objects property gets the pool and all objects it contains, including elements and inner-pools. The Pools.Remove() method is equivalent to calling the Pool.Remove() method, as both methods remove the pool itself from pools collection.
Example
The following sample removes the first pool of the control:

 oSwimlane.Pool(0).Remove();

The following sample removes the first pool of the control and all objects it contains:

 oSwimlane.Pool(0).Objects.forEach(function(oObject)
 {
  oObject.Remove();
 });

where oSwimlane is an object of Swimlane type
Remove

SendBackward() → {number}

The SendBackward() method moves the pool down one level, so that it is closer to the bottom of the stacking order. The position is a zero-based number that indicates the pool's stacking order within the control. The first pool has a position of 0, the second a position of 1, and so on. The position determines the visual layering of pools, with higher-positioned pools appearing in front of lower-positioned ones. The position can be changed using this method or by using methods like BringToFront(), BringForward(), and others that adjust the pool's stacking order. The Index property, on the other hand, provides a more stable reference for identifying a pool within the control, as it is based on the pool's order in the collection rather than its visual layering. Pools are displayed on the control's background, while elements and links appear in the foreground. As a result, changing a pool's position (its visual stacking order) does not affect the position of the elements or links contained within that pool.
Returns:
Returns the pool's previously position
Type
number
Example
SendBackward(), moves the first pool down one level, so that it is closer to the bottom of the stacking order
SendBackward

SendToBack() → {number}

The SendToBack() method moves the pool to the bottom of the stacking order, so that it is behind the other pools. The position is a zero-based number that indicates the pool's stacking order within the control. The first pool has a position of 0, the second a position of 1, and so on. The position determines the visual layering of pools, with higher-positioned pools appearing in front of lower-positioned ones. The position can be changed using this method or by using methods like BringToFront(), BringForward(), and others that adjust the pool's stacking order. The Index property, on the other hand, provides a more stable reference for identifying a pool within the control, as it is based on the pool's order in the collection rather than its visual layering. Pools are displayed on the control's background, while elements and links appear in the foreground. As a result, changing a pool's position (its visual stacking order) does not affect the position of the elements or links contained within that pool.
Returns:
Returns the pool's previously position
Type
number
Example
SendToBack(), moves the first pool to the bottom of the stacking order, so that it is behind the other pools
SendToBack

StartUpdatePool() → {array}

The StartUpdatePool() method starts changing properties of the pool, so EndUpdatePool method adds programmatically updated properties to undo/redo queue. You can use the StartBlockUndoRedo / EndBlockUndoRedo methods to group multiple Undo/Redo operations into a single-block. The AllowUndoRedo property specifies whether the control supports undo/redo operations for objects (pools, links, ...). No entry is added to the Undo/Redo queue if no property is changed for the current pool. The UpdatePool() method automatically calls StartBlockUndoRedo / EndBlockUndoRedo methods, so you don't need to call them explicitly when using the UpdatePool() method to update the pool's properties.
Since:
  • 2.0 The following statements are equivalent: var oStartPoolUpdate = oPool.StartUpdatePool(); // {object} holds undefined (no undo-redo supported) or a copy of the pool's properties // ... changes properties of the pool programmatically oPool.EndUpdatePool(oStartPoolUpdate); or oPool.UpdatePool(function() { // ... changes properties of the pool programmatically }); where oPool is an object of Pool type
Returns:
Returns undefined (no undo/redo is allowed) or an array of [{o(bject), c(opy)o(bject)O(ptions)} type (to be passed to EndUpdatePool method), as explained: o(bject) {object}, specifies the object to start recording updating the properties (could be an element or a pool) c(opy)o(bject)O(ptions) {object}, specifies the object's creation-options
Type
array

UpdatePool(callback, thisArg)

The UpdatePool() method records the changes of pool's properties into control's Undo/Redo queue. The UpdatePool() method calls StartUpdatePool / EndUpdatePool methods. The AllowUndoRedo property specifies whether the control supports undo/redo operations for objects (pools, links, ...). No entry is added to the Undo/Redo queue if no property is changed for the current pool. You can use the StartBlockUndoRedo / EndBlockUndoRedo methods to group multiple Undo/Redo operations into a single-block.
Parameters:
Name Type Description
callback callback Specifies a function of callback() type.
thisArg any Indicates the value of "this" keyword during the callback, or the object itself if missing.
Example
The following statements are equivalent:
 
 var oStartPoolUpdate = oPool.StartUpdatePool(); // {object} holds undefined (no undo-redo supported) or a copy of the pool's properties
 // ... changes properties of the pool programmatically
 oPool.EndUpdatePool(oStartPoolUpdate);

or

 oPool.UpdatePool(function()
 {
  // ... changes properties of the pool programmatically
 });

where oPool is an object of Pool type
UpdatePool