WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
cscore C++ object-oriented API

Recommended interface for C++, identical to Java API. More...

Classes

class  wpi::cs::VideoProperty
 A source or sink property. More...

Enumerations

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

Functions

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

Friends

class wpi::cs::VideoProperty::ImageSource
class wpi::cs::VideoProperty::VideoEvent
class wpi::cs::VideoProperty::VideoSink
class wpi::cs::VideoProperty::VideoSource

Detailed Description

Recommended interface for C++, identical to Java API.

The classes are RAII and handle reference counting internally.

Enumeration Type Documentation

◆ Kind

Enumerator
kNone 

No specific property.

kBoolean 

Boolean property.

kInteger 

Integer property.

kString 

String property.

kEnum 

Enum property.

Function Documentation

◆ Get()

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

Returns property value.

Returns
Property value.

◆ GetChoices()

std::vector< std::string > wpi::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 wpi::cs::VideoProperty::GetDefault ( ) const
inline

Returns property default value.

Returns
Property default value.

◆ GetKind()

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

Returns property kind.

Returns
Property kind.

◆ GetLastStatus()

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

Returns the last status.

Returns
The last status.

◆ GetMax()

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

Returns property maximum value.

Returns
Property maximum value.

◆ GetMin()

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

Returns property minimum value.

Returns
Property minimum value.

◆ GetName()

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

Returns property name.

Returns
Property name.

◆ GetStep()

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

Returns property step size.

Returns
Property step size.

◆ GetString() [1/2]

std::string wpi::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 wpi::cs::VideoProperty::GetString ( wpi::util::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 wpi::cs::VideoProperty::IsBoolean ( ) const
inline

Returns true if property is a boolean.

Returns
True if property is a boolean.

◆ IsEnum()

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

Returns true if property is an enum.

Returns
True if property is an enum.

◆ IsInteger()

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

Returns true if property is an integer.

Returns
True if property is an integer.

◆ IsString()

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

Returns true if property is a string.

Returns
True if property is a string.

◆ operator bool()

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

Returns true if property is valid.

Returns
True if property is valid.

◆ Set()

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

Sets property value.

Parameters
valueProperty value.

◆ SetString()

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

Sets the string property value.

This function is string-specific.

Parameters
valueString property value.

◆ VideoProperty()

wpi::cs::VideoProperty::VideoProperty ( )
default

Friends

◆ ImageSource

friend class ImageSource
friend

◆ VideoEvent

friend class VideoEvent
friend

◆ VideoSink

friend class VideoSink
friend

◆ VideoSource

friend class VideoSource
friend