rtop
Public Member Functions | Private Attributes | Friends | List of all members
rtop::InfoProc< T > Class Template Reference

data structure that defines type of entry from which panel menu entries obtain their c-string data More...

#include <info.h>

Public Member Functions

 InfoProc (T v)
 InfoProc constructor. Initializes InfoProc with provided value. More...
 
Val ()
 returns stored value More...
 
void setVal (T v)
 sets value More...
 
const char * longDesc ()
 
const char * shortDesc ()
 returns c-string corresponding to stored value. wasteful, as performs conversion everytime More...
 

Private Attributes

val
 
std::string shortdesc
 string representation of value More...
 

Friends

bool operator<= (const InfoProc< std::string > &, const InfoProc< std::string > &)
 overloaded <= operator for comparing two InfoProc objects More...
 
template<typename J >
std::ostream & operator<< (std::ostream &, const InfoProc< J > &)
 

Detailed Description

template<class T = int>
class rtop::InfoProc< T >

data structure that defines type of entry from which panel menu entries obtain their c-string data

template type and thus capable to holding any type - int, float, string etc provide API to access stored value as c-string

Todo:
: seems a bloated way to hold data. investigate & refactor

Definition at line 71 of file info.h.

Constructor & Destructor Documentation

◆ InfoProc()

template<class T = int>
rtop::InfoProc< T >::InfoProc ( v)
inline

InfoProc constructor. Initializes InfoProc with provided value.

Definition at line 79 of file info.h.

Member Function Documentation

◆ longDesc()

template<class T = int>
const char* rtop::InfoProc< T >::longDesc ( )
inline
Todo:
: redundant. remove

Definition at line 85 of file info.h.

◆ setVal()

template<class T = int>
void rtop::InfoProc< T >::setVal ( v)
inline

sets value

Definition at line 83 of file info.h.

◆ shortDesc()

template<class T = int>
const char* rtop::InfoProc< T >::shortDesc ( )
inline

returns c-string corresponding to stored value. wasteful, as performs conversion everytime

Definition at line 90 of file info.h.

◆ Val()

template<class T = int>
T rtop::InfoProc< T >::Val ( )
inline

returns stored value

Definition at line 81 of file info.h.

Friends And Related Function Documentation

◆ operator<<

template<class T = int>
template<typename J >
std::ostream& operator<< ( std::ostream &  ,
const InfoProc< J > &   
)
friend

◆ operator<=

template<class T = int>
bool operator<= ( const InfoProc< std::string > &  a,
const InfoProc< std::string > &  b 
)
friend

overloaded <= operator for comparing two InfoProc objects

Definition at line 103 of file info.h.

Member Data Documentation

◆ shortdesc

template<class T = int>
std::string rtop::InfoProc< T >::shortdesc
private

string representation of value

Definition at line 76 of file info.h.

◆ val

template<class T = int>
T rtop::InfoProc< T >::val
private

Definition at line 74 of file info.h.


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