Rhino C++ API  8.14
Public Member Functions | List of all members
ON_FunctionList Class Reference

#include <opennurbs_function_list.h>

Public Member Functions

 ON_FunctionList (size_t function_count_estimate)
 
 ~ON_FunctionList ()
 
unsigned int AddFunction (void(*function)(ON__UINT_PTR), ON__UINT_PTR function_parameter)
 
bool CallFunctions (bool bFirstToLast)
 
bool EmptyList ()
 
unsigned int FunctionCount () const
 
bool InUse () const
 
unsigned int IsInList (void(*function)(ON__UINT_PTR)) const
 
unsigned int IsInList (void(*function)(ON__UINT_PTR), ON__UINT_PTR function_parameter) const
 
unsigned int RemoveFunction (void(*function)(ON__UINT_PTR))
 
unsigned int RemoveFunction (void(*function)(ON__UINT_PTR), ON__UINT_PTR function_parameter)
 

Detailed Description

Copyright (c) 1993-2022 Robert McNeel & Associates. All rights reserved. OpenNURBS, Rhinoceros, and Rhino3D are registered trademarks of Robert McNeel & Associates.

THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.

For complete openNURBS copyright information see http://www.opennurbs.org.

Constructor & Destructor Documentation

◆ ON_FunctionList()

ON_FunctionList::ON_FunctionList ( size_t  function_count_estimate)

Parameters: function_count_estimate - [in] An estimate of the maximum number of functions that will be in the list at any one time. Pass 0 if you don't know.

◆ ~ON_FunctionList()

ON_FunctionList::~ON_FunctionList ( )

Member Function Documentation

◆ AddFunction()

unsigned int ON_FunctionList::AddFunction ( void(*)(ON__UINT_PTR)  function,
ON__UINT_PTR  function_parameter 
)

Description: Unconditionally add a function to the list. Parameters: function - [in] A function that takes a single ON__UINT_PTR parameter. function_parameter - [in] Returns: 0: list in use 1: function added 2: invalid input

◆ CallFunctions()

bool ON_FunctionList::CallFunctions ( bool  bFirstToLast)

Description: Call all the functions in the function list. Parameters: bFirstToLast - [in] true - function are called in the order added false - functions are called in the reverse order added
Returns: True if the functions were called or the list is empty. False if the list is in use.

◆ EmptyList()

bool ON_FunctionList::EmptyList ( )

Returns: 0: list in use 1: list was emptied

◆ FunctionCount()

unsigned int ON_FunctionList::FunctionCount ( ) const

◆ InUse()

bool ON_FunctionList::InUse ( ) const

Returns: True if the list is in use.

◆ IsInList() [1/2]

unsigned int ON_FunctionList::IsInList ( void(*)(ON__UINT_PTR)  function) const

Returns: 0: list in use 1: Matching function is in the list. 2: Matching function is not in the list.

◆ IsInList() [2/2]

unsigned int ON_FunctionList::IsInList ( void(*)(ON__UINT_PTR)  function,
ON__UINT_PTR  function_parameter 
) const

Returns: 0: Matching function and parameter are not in the list. 1: Matching function and parameter are in the list. 2: list in use

◆ RemoveFunction() [1/2]

unsigned int ON_FunctionList::RemoveFunction ( void(*)(ON__UINT_PTR)  function)

Returns: 0: list in use 1: function removed 2: matching function not in the list

◆ RemoveFunction() [2/2]

unsigned int ON_FunctionList::RemoveFunction ( void(*)(ON__UINT_PTR)  function,
ON__UINT_PTR  function_parameter 
)

Returns: 0: list in use 1: function removed 2: matching function not in the list