sure...
It may be easier to pass a pointer to the Serial object into the class, for example:
class Context{
public:
Context(HardwareSerial* serial){
stream = serial;
}
void send(const char* mssg){
stream->print(mssg);
}
private:
Stream* stream;
};
Context myInstance(&Serial);
void setup()
{
Serial.begin(9600);
myInstance.send("Testing, 1, 2, 3");
}
void loop() {
// put your main code here, to run repeatedly:
}