Is it possible read STDIN using UE classes

Is it possible read STDIN using UE classes?
Like this, but with UE classes.

#include <iostream>
#include <string>
using namespace std;

int main() {
    while (1) { // each tick
        if (cin) {
            string inputLine;
            getline(cin, inputLine);
            cout << inputLine << endl;
        }
    }
    return 0;
}