libdap::ServerFunctionsList Class Reference

## Public Types

typedef std::multimap< std::string, ServerFunction * >::const_iterator | SFLCIter
typedef std::multimap< std::string, ServerFunction * >::iterator | SFLIter

## Public Member Functions

virtual void | add_function (ServerFunction *func)
| Adds the passed ServerFunction pointer to the list of ServerFunctions. More...
SFLIter | begin ()
| Returns an iterator pointing to the first key pair in the ServerFunctionList. More...
SFLIter | end ()
| Returns an iterator pointing to the last key pair in the ServerFunctionList. More...
virtual bool | find_function (const std::string &name, bool_func *f) const
| Find a boolean function with a given name in the function list. More...
virtual bool | find_function (const std::string &name, btp_func *f) const
| Find a BaseType function with a given name in the function list. More...
virtual bool | find_function (const std::string &name, proj_func *f) const
| Find a projection function with a given name in the function list. More...
virtual bool | find_function (const std::string &name, D4Function *f) const
ServerFunction * | getFunction (SFLIter it)
| Returns the ServerFunction pointed to by the passed iterator. More...
virtual void | getFunctionNames (std::vector< std::string > *names)

## Static Public Member Functions

static ServerFunctionsList * | TheList ()

## Friends

class | ServerFunctionsListUnitTest

## Detailed Description

Definition at line 46 of file ServerFunctionsList.h.

## Member Function Documentation

## add_function()

void libdap::ServerFunctionsList::add_function | ( | ServerFunction * | func | ) |

virtual

Adds the passed ServerFunction pointer to the list of ServerFunctions.

Adds the passed ServerFunction pointer to the list of ServerFunctions using the value of ServerFunction.getName() as the key in the list.

Parameters

  *func | A pointer to the ServerFunction object to add to the ServerFunctionList. The pointer is copied, not the object referenced; this class does not delete the pointer.

Definition at line 103 of file ServerFunctionsList.cc.

## begin()

ServerFunctionsList::SFLIter libdap::ServerFunctionsList::begin | ( |  | ) |

Returns an iterator pointing to the first key pair in the ServerFunctionList.

Definition at line 245 of file ServerFunctionsList.cc.

## end()

ServerFunctionsList::SFLIter libdap::ServerFunctionsList::end | ( |  | ) |

Returns an iterator pointing to the last key pair in the ServerFunctionList.

Definition at line 251 of file ServerFunctionsList.cc.

## find_function() [1/4]

bool libdap::ServerFunctionsList::find_function | ( | const std::string & | name,
|  | bool_func * | f
| ) |  | const

virtual

Find a boolean function with a given name in the function list.

Returns the first boolean function in the list whose key value matches the passed string name. When a match is found the function returns true and sets returned value parameter *f to the boolean function held by the ServerFunction object extracted from the list.

Method: Looks through the list of ServerFunctions and compares each function's key value (which would be the value of SurverFunction.getName()) with the value of the string parameter 'name'. When they match then the returned value parameter is set to the value returned by ServerFunction.get_btp_func(). If the ServerFunction is not a instance of a boolean function then the return value will be 0 (null) and the search for matching function will continue. If the ServerFunction is a boolean function then the returned value will be non-zero and the search will return true (it found the thing) and the returned value parameter *f will have it's value set to the boolean function.

Parameters

  name | A string containing the name of the function to find.
  *f | A returned value parameter through which a point to the desired function is returned.

Definition at line 129 of file ServerFunctionsList.cc.

## find_function() [2/4]

bool libdap::ServerFunctionsList::find_function | ( | const std::string & | name,
|  | btp_func * | f
| ) |  | const

virtual

Find a BaseType function with a given name in the function list.

Returns the first BaseType function in the list whose key value matches the passed string name. When a match is found the function returns true and sets returned value parameter *f to the BaseType function held by the ServerFunction object extracted from the list.

Method: Looks through the list of ServerFunctions and compares each function's key value (which would be the value of SurverFunction.getName()) with the value of the string parameter 'name'. When they match then the returned value parameter is set to the value returned by ServerFunction.get_btp_func(). If the ServerFunction is not a instance of a BaseType function then the return value will be 0 (null) and the search for matching function will continue. If the ServerFunction is a BaseType function then the returned value will be non-zero and the search will return true (it found the thing) and the returned value parameter *f will have it's value set to the BaseType function.

Parameters

  name | A string containing the name of the function to find.
  *f | A returned value parameter through which a point to the desired function is returned.

Definition at line 166 of file ServerFunctionsList.cc.

## find_function() [3/4]

bool libdap::ServerFunctionsList::find_function | ( | const std::string & | name,
|  | proj_func * | f
| ) |  | const

virtual

Find a projection function with a given name in the function list.

Returns the first projection function in the list whose key value matches the passed string name. When a match is found the function returns true and sets returned value parameter *f to the projection function held by the ServerFunction object extracted from the list.

Method: Looks through the list of ServerFunctions and looks at each function's key value (which would be the value of SurverFunction.getName() for each function). When a function has the same key name as the value of the string parameter 'name', then the returned value parameter is set the value returned by ServerFunction.get_proj_func(). If the ServerFunction is not a projection function then the return value will be 0 (null) and the search for matching function will continue. If the ServerFunction is a projection then the returned value will be non-zero and the search will return true (it found the thing) and the returned value parameter *f will have it's value set to the projection function.

Parameters

  name | A string containing the name of the function to find.
  *f | A returned value parameter through which a point to the desired function is returned.

Definition at line 204 of file ServerFunctionsList.cc.

## find_function() [4/4]

bool libdap::ServerFunctionsList::find_function | ( | const std::string & | name,
|  | D4Function * | f
| ) |  | const

virtual

Find a DAP4 function in the Server Functions List.

Parameters

  name | Look for this function name
  f | Value-result parameter. NULL if the function is not found

Returns
  True if the function was found, otherwise false.

Definition at line 228 of file ServerFunctionsList.cc.

## getFunction()

ServerFunction * libdap::ServerFunctionsList::getFunction | ( | SFLIter | it | ) |

Returns the ServerFunction pointed to by the passed iterator.

Definition at line 262 of file ServerFunctionsList.cc.

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

- ServerFunctionsList.h
- ServerFunctionsList.cc