// trick to apply 'virtual out..' on remaining C++ object, that has a function "ArchiveOUT" public void outs <T>(ChNameValue <T> bVal) { bool tracked = false; int obj_ID = 0; /* if (bVal.flags() & NVP_TRACK_OBJECT) * { * bool already_stored = false; * T mptr = bVal.value(); * PutPointer(mptr, ref already_stored, ref obj_ID); * if (already_stored) * { throw (ChExceptionArchive("Cannot serialize tracked object '" + string(bVal.name()) + "' by value, AFTER already serialized by pointer.")); } * tracked = true; * } * ChValueSpecific<T> specVal(bVal.value(), bVal.name(), bVal.flags()); * this.outs( * specVal, * tracked, * obj_ID);*/ }
/// Operator to allow easy serialization as myarchive << mydata; public ChArchiveOut shiftleft <T>(ChNameValue <T> bVal) where T : unmanaged { this.outs(bVal); return(this); }
public abstract void outs(ChNameValue <ulong> bVal);
// public abstract void outs(ChNameValue<ulong ulong> bVal); public abstract void outs(ChNameValue <ChEnumMapperBase> bVal);
public abstract void outs(ChNameValue <uint> bVal);
public abstract void outs(ChNameValue <string> bVal);
public abstract void outs(ChNameValue <char> bVal);
public abstract void outs(ChNameValue <float> bVal);
public abstract void outs(ChNameValue <double> bVal);
//--------------------------------------------------- // INTERFACES - to be implemented by children classes // // for integral types: public abstract void outs(ChNameValue <bool> bVal);
public ChNameValue(ChNameValue <T> other) { _name = other._name; _value = other._value; _flags = other._flags; }