首页> 外文期刊>C - C++ Users Journal >GenSerial: A Generic C++ Serialization Library
【24h】

GenSerial: A Generic C++ Serialization Library

机译:GenSerial:通用C ++序列化库

获取原文
获取原文并翻译 | 示例
           

摘要

Sooner or later, in almost every serious project a fundamental question comes up: "How will users load and save data?" Depending on the complexity of the project, that question can have a wide range of answers. For example, a simple address book application might only need to handle a single address book entry class; saving to a file might simply involve calling a method of the class called Write and passing it an std:: ostream&. Loading from a file could be equally simple—just read in an integer indicating the number of records in the file, and call a Read method that many times. On the other hand, consider a full-scale computer-aided-design application. Its database is likely to be incredibly complicated, perhaps containing graph-like structures representing topology, reference-counted shared pointers, template classes, multiple inherited classes, abstract base classes, and the like. In such cases, simple Read/Write methods are cumbersome to implement and can lead to all kinds of maintenance nightmares as developers forget to update them, or update them incorrectly. When data needs to be upgradeable from one release of the application to the next, the nightmares get even worse.
机译:迟早在几乎每个严肃的项目中都会出现一个基本问题:“用户将如何加载和保存数据?”根据项目的复杂性,该问题可以有广泛的答案。例如,一个简单的通讯录应用程序可能只需要处理一个通讯录条目类;保存到文件中可能只涉及调用名为Write的类的方法并将其传递给std :: ostream&。从文件加载可能同样简单-只需读取一个整数即可指示文件中的记录数,然后多次调用Read方法。另一方面,考虑一个完整的计算机辅助设计应用程序。它的数据库可能非常复杂,可能包含表示拓扑结构,引用计数的共享指针,模板类,多个继承的类,抽象基类等的类似图形的结构。在这种情况下,简单的读取/写入方法难以实现,并且会导致各种维护噩梦,因为开发人员忘记了对其进行更新或错误地对其进行了更新。当数据需要从应用程序的一个版本升级到下一个版本时,噩梦变得更糟。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号