WPILibC++ 2024.3.2
cs::VideoProperty Class Reference

A source or sink property. More...

#include <cscore_oo.h>

Public Types

enum  Kind {
  kNone = CS_PROP_NONE , kBoolean = CS_PROP_BOOLEAN , kInteger = CS_PROP_INTEGER , kString = CS_PROP_STRING ,
  kEnum = CS_PROP_ENUM
}
 

Public Member Functions

 VideoProperty ()=default
 
std::string GetName () const
 Returns property name. More...
 
Kind GetKind () const
 Returns property kind. More...
 
 operator bool () const
 Returns true if property is valid. More...
 
bool IsBoolean () const
 Returns true if property is a boolean. More...
 
bool IsInteger () const
 Returns true if property is an integer. More...
 
bool IsString () const
 Returns true if property is a string. More...
 
bool IsEnum () const
 Returns true if property is an enum. More...
 
int Get () const
 Returns property value. More...
 
void Set (int value)
 Sets property value. More...
 
int GetMin () const
 Returns property minimum value. More...
 
int GetMax () const
 Returns property maximum value. More...
 
int GetStep () const
 Returns property step size. More...
 
int GetDefault () const
 Returns property default value. More...
 
std::string GetString () const
 Returns the string property value. More...
 
std::string_view GetString (wpi::SmallVectorImpl< char > &buf) const
 Returns the string property value as a reference to the given buffer. More...
 
void SetString (std::string_view value)
 Sets the string property value. More...
 
std::vector< std::string > GetChoices () const
 Returns the possible values for the enum property value. More...
 
CS_Status GetLastStatus () const
 Returns the last status. More...
 

Friends

class ImageSource
 
class VideoEvent
 
class VideoSink
 
class VideoSource
 

Detailed Description

A source or sink property.

Member Enumeration Documentation

◆ Kind

Enumerator
kNone 

No specific property.

kBoolean 

Boolean property.

kInteger 

Integer property.

kString 

String property.

kEnum 

Enum property.

Constructor & Destructor Documentation

◆ VideoProperty()

cs::VideoProperty::VideoProperty ( )
default

Member Function Documentation

◆ Get()

int cs::VideoProperty::Get ( ) const
inline

Returns property value.

Returns
Property value.

◆ GetChoices()

std::vector< std::string > cs::VideoProperty::GetChoices ( ) const
inline

Returns the possible values for the enum property value.

This function is enum-specific.

Returns
The possible values for the enum property value.

◆ GetDefault()

int cs::VideoProperty::GetDefault ( ) const
inline

Returns property default value.

Returns
Property default value.

◆ GetKind()

Kind cs::VideoProperty::GetKind ( ) const
inline

Returns property kind.

Returns
Property kind.

◆ GetLastStatus()

CS_Status cs::VideoProperty::GetLastStatus ( ) const
inline

Returns the last status.

Returns
The last status.

◆ GetMax()

int cs::VideoProperty::GetMax ( ) const
inline

Returns property maximum value.

Returns
Property maximum value.

◆ GetMin()

int cs::VideoProperty::GetMin ( ) const
inline

Returns property minimum value.

Returns
Property minimum value.

◆ GetName()

std::string cs::VideoProperty::GetName ( ) const
inline

Returns property name.

Returns
Property name.

◆ GetStep()

int cs::VideoProperty::GetStep ( ) const
inline

Returns property step size.

Returns
Property step size.

◆ GetString() [1/2]

std::string cs::VideoProperty::GetString ( ) const
inline

Returns the string property value.

This function is string-specific.

Returns
The string property value.

◆ GetString() [2/2]

std::string_view cs::VideoProperty::GetString ( wpi::SmallVectorImpl< char > &  buf) const
inline

Returns the string property value as a reference to the given buffer.

This function is string-specific.

Parameters
bufThe backing storage to which to write the property value.
Returns
The string property value as a reference to the given buffer.

◆ IsBoolean()

bool cs::VideoProperty::IsBoolean ( ) const
inline

Returns true if property is a boolean.

Returns
True if property is a boolean.

◆ IsEnum()

bool cs::VideoProperty::IsEnum ( ) const
inline

Returns true if property is an enum.

Returns
True if property is an enum.

◆ IsInteger()

bool cs::VideoProperty::IsInteger ( ) const
inline

Returns true if property is an integer.

Returns
True if property is an integer.

◆ IsString()

bool cs::VideoProperty::IsString ( ) const
inline

Returns true if property is a string.

Returns
True if property is a string.

◆ operator bool()

cs::VideoProperty::operator bool ( ) const
inlineexplicit

Returns true if property is valid.

Returns
True if property is valid.

◆ Set()

void cs::VideoProperty::Set ( int  value)
inline

Sets property value.

Parameters
valueProperty value.

◆ SetString()

void cs::VideoProperty::SetString ( std::string_view  value)
inline

Sets the string property value.

This function is string-specific.

Parameters
valueString property value.

Friends And Related Function Documentation

◆ ImageSource

friend class ImageSource
friend

◆ VideoEvent

friend class VideoEvent
friend

◆ VideoSink

friend class VideoSink
friend

◆ VideoSource

friend class VideoSource
friend

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