This forum has been archived. Please start a new discussion on GitHub.

Question about IceUtil?

Dear Sir,

As a matter of fact, ICE supports many languages and platforms. However, now I would wirte my own application based on ICE. I need to access I/O and file,etc. I notice that IceUitl implement some support function such as Thread,String.

My question is how to write more portable applications based on ICE. For example, I would define an integer as: int x; or something like ICE::int

ICE wrapper all the functions inside of STLport, or I could directly use functions inside of STLport.

Sometime, I got confused. When I want to access I/O, firstly I would use Iostream from STLport, but I wonder whether ICE provides something like ICE::io

That's all.

Good luck!



  • bernard
    bernard Jupiter, FL

    IceUtil is (as its name indicates) a utility library with a number of classes (Thread, Mutex, Monitor, CTRL-C handler ...). It does not duplicate or wrap standard portable classes such as standard containers/iterators/algorithm, or the iostream library; for example Ice/IceUtil uses simply std::string.

    Regarding Ice::Int vers int, currently they are identical (32 bit signed integer) on all supported Ice platforms, so it does not matter much which one you pick.
    Assuming Ice is ported one day to a platform where int is not a 32 bit signed integer, Ice::Int will be still be a typedef to a 32 bit signed integer (assuming there is such a native type, which is extremely likely!).

    Hope this helps!