Skip to content

Commit

Permalink
ofxOsc: add const for getter method returns constant. (#6018)
Browse files Browse the repository at this point in the history
  • Loading branch information
2bbb authored and arturoc committed Jul 31, 2018
1 parent 678963e commit c7bb09c
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions addons/ofxOsc/src/ofxOscArg.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class ofxOscArg{
virtual ~ofxOscArg() {}

/// \return argument type
virtual ofxOscArgType getType() {return OFXOSC_TYPE_NONE;}
virtual ofxOscArgType getType() const {return OFXOSC_TYPE_NONE;}

/// \return type character as a string
virtual std::string getTypeName() {return "N";}
virtual std::string getTypeName() const {return "N";}
};

/// \class ofxOscArgInt32
Expand All @@ -67,10 +67,10 @@ class ofxOscArgInt32 : public ofxOscArg{
ofxOscArgInt32(std::int32_t value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_INT32;}
ofxOscArgType getType() const {return OFXOSC_TYPE_INT32;}

/// \return argument type character as a string
std::string getTypeName() {return "i";}
std::string getTypeName() const {return "i";}

/// \return value
std::int32_t get() const {return value;}
Expand All @@ -96,10 +96,10 @@ class ofxOscArgInt64 : public ofxOscArg{
ofxOscArgInt64(std::int64_t value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_INT64;}
ofxOscArgType getType() const {return OFXOSC_TYPE_INT64;}

/// \return argument type character as a string
std::string getTypeName() {return "h";}
std::string getTypeName() const {return "h";}

/// \return value
std::int64_t get() const {return value;}
Expand All @@ -118,10 +118,10 @@ class ofxOscArgFloat : public ofxOscArg{
ofxOscArgFloat(float value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_FLOAT;}
ofxOscArgType getType() const {return OFXOSC_TYPE_FLOAT;}

/// \return argument type character as a string
std::string getTypeName() {return "f";}
std::string getTypeName() const {return "f";}

/// \return value
float get() const {return value;}
Expand All @@ -140,10 +140,10 @@ class ofxOscArgDouble : public ofxOscArg{
ofxOscArgDouble(double value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_DOUBLE;}
ofxOscArgType getType() const {return OFXOSC_TYPE_DOUBLE;}

/// \return argument type character as a string
std::string getTypeName() {return "d";}
std::string getTypeName() const {return "d";}

/// \return value
double get() const {return value;}
Expand All @@ -162,10 +162,10 @@ class ofxOscArgString : public ofxOscArg{
ofxOscArgString(const std::string &value ) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_STRING;}
ofxOscArgType getType() const {return OFXOSC_TYPE_STRING;}

/// \return argument type character as a string
std::string getTypeName() {return "s";}
std::string getTypeName() const {return "s";}

/// \return value
const std::string &get() const {return value;}
Expand All @@ -187,10 +187,10 @@ class ofxOscArgSymbol : public ofxOscArgString{
ofxOscArgSymbol(const std::string &value) : ofxOscArgString(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_SYMBOL;}
ofxOscArgType getType() const {return OFXOSC_TYPE_SYMBOL;}

/// \return argument type character as a string
std::string getTypeName() {return "S";}
std::string getTypeName() const {return "S";}
};

/// \class ofxOscArgChar
Expand All @@ -200,10 +200,10 @@ class ofxOscArgChar : public ofxOscArg{
ofxOscArgChar(char value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_CHAR;}
ofxOscArgType getType() const {return OFXOSC_TYPE_CHAR;}

/// \return argument type character as a string
std::string getTypeName() {return "c";}
std::string getTypeName() const {return "c";}

/// return value
char get() const {return value;}
Expand All @@ -222,10 +222,10 @@ class ofxOscArgMidiMessage : public ofxOscArg{
ofxOscArgMidiMessage(std::uint32_t value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_MIDI_MESSAGE;}
ofxOscArgType getType() const {return OFXOSC_TYPE_MIDI_MESSAGE;}

/// \return argument type character as a string
std::string getTypeName() {return "m";}
std::string getTypeName() const {return "m";}

/// return value
std::uint32_t get() const {return value;}
Expand All @@ -244,12 +244,12 @@ class ofxOscArgBool : public ofxOscArg{
ofxOscArgBool(bool value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {
ofxOscArgType getType() const {
return value ? OFXOSC_TYPE_TRUE : OFXOSC_TYPE_FALSE;
}

/// \return argument type character as a string
std::string getTypeName() {
std::string getTypeName() const {
return value ? "T" : "F";
}

Expand All @@ -270,10 +270,10 @@ class ofxOscArgNone : public ofxOscArgBool{
ofxOscArgNone() : ofxOscArgBool(true) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_NONE;}
ofxOscArgType getType() const {return OFXOSC_TYPE_NONE;}

/// \return argument type character as a string
std::string getTypeName() {return "N";}
std::string getTypeName() const {return "N";}
};

/// \class ofxOscArgTrigger
Expand All @@ -283,10 +283,10 @@ class ofxOscArgTrigger : public ofxOscArgBool{
ofxOscArgTrigger() : ofxOscArgBool(true) {}

/// return the type of this argument
ofxOscArgType getType() {return OFXOSC_TYPE_TRIGGER;}
ofxOscArgType getType() const {return OFXOSC_TYPE_TRIGGER;}

/// \return argument type character as a string
std::string getTypeName() {return "I";}
std::string getTypeName() const {return "I";}
};

/// \class ofxOscArgTimetag
Expand All @@ -296,10 +296,10 @@ class ofxOscArgTimetag : public ofxOscArg{
ofxOscArgTimetag(std::uint64_t value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_TIMETAG;}
ofxOscArgType getType() const {return OFXOSC_TYPE_TIMETAG;}

/// \return argument type character as a string
std::string getTypeName() {return "t";}
std::string getTypeName() const {return "t";}

/// return value
std::uint64_t get() const {return value;}
Expand All @@ -318,10 +318,10 @@ class ofxOscArgBlob : public ofxOscArg{
ofxOscArgBlob(const ofBuffer &value) : value(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_BLOB;}
ofxOscArgType getType() const {return OFXOSC_TYPE_BLOB;}

/// \return argument type character as a string
std::string getTypeName() {return "b";}
std::string getTypeName() const {return "b";}

/// return value
const ofBuffer &get() const {return value;}
Expand All @@ -342,8 +342,8 @@ class ofxOscArgRgbaColor : public ofxOscArgMidiMessage{
ofxOscArgRgbaColor(std::uint32_t value) : ofxOscArgMidiMessage(value) {}

/// \return argument type
ofxOscArgType getType() {return OFXOSC_TYPE_RGBA_COLOR;}
ofxOscArgType getType() const {return OFXOSC_TYPE_RGBA_COLOR;}

/// \return argument type character as a string
std::string getTypeName() {return "r";}
std::string getTypeName() const {return "r";}
};

0 comments on commit c7bb09c

Please sign in to comment.