c++里面有类似java里面的toString,equals之类的方法吗?该如何解决

c++里面有类似java里面的toString,equals之类的方法吗?
提3个大问题:

1,c++是否有toString,equals等?
2,c++有orm框架吗?有类java里面的spring框架吗?
3,标准C++语法里面有序列化之说吗?如何使用呀?序列化到文件采用的格式是什么样的?

------解决方案--------------------
1、
struct object
{
virtual string toString();
};

struct car : public object
{
virtual string toString() { return "car "; }
bool operator ==(const car&);
};

2、
没听说过

3、
没有,MFC中有,可以参考。标准C++可以重载ostream < <和istream> > 来实现类似功能。
------解决方案--------------------
自己写ostream& operater < <(ostream& o,[object]& obj);

然后
stringstream sstrm;
sstrm < <obj;
------解决方案--------------------
equals等价于operator==
标准库没有规定序列化格式
C++的ORM框架没见过,因为C++缺乏反射机制,实现起来很复杂,我曾经尝试过,没有反射机制确实很难做到易用,最后放弃了
------解决方案--------------------
toString 可以用 stingstream 实现,
或者使用 C 中 sprintf ,
或者其他方式, 比如 itoa 等

比如:
ostringstream os;
os < <100 < <endl;
string str = os.str(); //得到 string
cout < <str < <endl;
------解决方案--------------------
equals 是有的:

#include <string>
bool operator==(const string& c1, const string& c2);
------解决方案--------------------
#include <string>
bool operator==(const string& c1, const string& c2);
bool operator!=(const string& c1, const string& c2);
bool operator <(const string& c1, const string& c2);
bool operator> (const string& c1, const string& c2);
bool operator <=(const string& c1, const string& c2);
bool operator> =(const string& c1, const string& c2);
string operator+(const string& s1, const string& s2 );
string operator+(const char* s, const string& s2 );
string operator+( char c, const string& s2 );
string operator+( const string& s1, const char* s );
string operator+( const string& s1, char c );
ostream& operator < <( ostream& os, const string& s );
istream& operator> > ( istream& is, string& s );
string& operator=( const string& s );
string& operator=( const char* s );
string& operator=( char ch );
char& operator[]( size_type index );
------解决方案--------------------
1都有类似的东西,但不完全一样
2不知道是什么东西,不过这东西就算没有现成的,也可以自己写一个
3mfc中有这样的实现。