UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
DmnSet.hpp
1 /* DmnSet.hpp */
2 /* $Id: DmnSet.hpp,v 1.4 2005/11/14 14:27:48 vlad Exp $ */
3 #ifndef __DmnSet_hpp
4 #define __DmnSet_hpp
5 
6 #include <string.h>
7 
8 #include <mix/Types.h>
9 #include <mix/DmnDef.h>
10 #include <mix/Exceptions.h>
11 #include <mix/Serial.hpp>
12 
13 
17 #define AnyType DomainDef
18 #define AnyAr DomainAr
19 #define AnyFormatSpec "\n%u: +%lu\t\"%s\" %s[%u] categ=%d options=%p"
20 #define AnyPrintList i, item.offset, item.name, \
21  AtomTypeToString[item.atype], item.dim, \
22  item.categ, item.options
23 //#define AnyPrintf printf(
24 #include <mix/AnyAr.H>
25 
26 
32 class DomainSet : public DomainAr, public SerialThis
33 {
34 public:
35 
36  DomainSet () {}
37  DomainSet (const DomainSet& dmnset)
38  : DomainAr(dmnset), SerialThis() {}
39  DomainSet (const DomainAr& dmnar)
40  : DomainAr(dmnar), SerialThis() {}
41  DomainSet (int dmns_n, const DomainDef* dmns);
42 
44  void add_domain (const char* name, AtomType atype, unsigned dim,
45  CategoryId categ = UC_NONE, void* opt = NULL);
46 
48  void add_domain (const DomainDef& ddef);
49 
51  virtual void serialize (OutputStream& ost) const;
52 
55  virtual void deserialize (InputStream& ist);
56 
57 };
58 
59 
60 #endif /* DmnSet.hpp */
void add_domain(const char *name, AtomType atype, unsigned dim, CategoryId categ=UC_NONE, void *opt=NULL)
Definition: DmnSet.hpp:32
Definition: Serial.hpp:22
virtual void deserialize(InputStream &ist)
Definition: DmnDef.h:25
Definition: Serial.hpp:69
virtual void serialize(OutputStream &ost) const
Definition: Serial.hpp:131