Get a pointer to the value stored in an OFvariant holding the selected alternative.  
More...
|  | 
| template<typename Alternative, typename... Alternatives> | 
| Alternative * | OFget (OFvariant< Alternatives... > *v) | 
|  | Try to get a pointer to the given alternative from an OFvariant object. 
 | 
|  | 
| template<typename Alternative, typename... Alternatives> | 
| const Alternative * | OFget (const OFvariant< Alternatives... > *v) | 
|  | Try to get a pointer to the given alternative from an OFvariant object. 
 | 
|  | 
Get a pointer to the value stored in an OFvariant holding the selected alternative. 
- See also
- OFvisit –   Apply a visitor to an OFvariant object.    
◆ OFget() [1/2]
template<typename Alternative, typename... Alternatives> 
  
  | 
        
          | const Alternative * OFget | ( | const OFvariant< Alternatives... > * | v | ) |  |  | related | 
 
Try to get a pointer to the given alternative from an OFvariant object. 
- Template Parameters
- 
  
    | Alternative | the chosen alternative that shall be accessed. |  | Alternatives | the alternatives the given variant could hold, will be deduced automatically. |  
 
- Parameters
- 
  
    | v | a const reference to an OFvariant object potentially holding Alternative. |  
 
- Returns
- the address of the contained value of type const Alternativeif such a value is contained.OFnullptrotherwise.
Usage Example:
{
  COUT << "Yes, it really is an int with the value " << *pI << '!' << OFendl;
  *pI = "27"; 
}
OFvariant()
Constructs a variant holding a default constructed value of the first alternative.
Alternative * OFget(OFvariant< Alternatives... > *v)
Try to get a pointer to the given alternative from an OFvariant object.
  
 
 
◆ OFget() [2/2]
template<typename Alternative, typename... Alternatives> 
  
  | 
        
          | Alternative * OFget | ( | OFvariant< Alternatives... > * | v | ) |  |  | related | 
 
Try to get a pointer to the given alternative from an OFvariant object. 
- Template Parameters
- 
  
    | Alternative | the chosen alternative that shall be accessed. |  | Alternatives | the alternatives the given variant could hold, will be deduced automatically. |  
 
- Parameters
- 
  
    | v | a reference to an OFvariant object potentially holding Alternative. |  
 
- Returns
- the address of the contained value of type Alternativeif such a value is contained.OFnullptrotherwise.
Usage Example:
{
  COUT << "Yes, it really is an int with the value " << *pI << '!' << OFendl;
  *pI = "27"; 
}