Beispiel #1
0
//-------------------------------------------------------
void CConnectArray::Serialize(CArch& ar)
{
  string key, s1="CConnectArray";
  CSFConnect* pCon;
  int Count,i;
  if (ar.IsStoring()) {
    Count = Acon.size();
    ar<<Count<<s1;

    for (i=0; i<Count;i++)  {
      pCon =Acon[i];   
      pCon->Serialize(ar);
    }
  }
  else
  {
    ar>>Count>>key;
    if (key !=s1) { throw (-8); }

    for(i=0; i<Count; i++) {
      pCon = new CSFConnect("Con");
      pCon->Serialize(ar);
      Acon.push_back(pCon);
    }
  }
}
Beispiel #2
0
void CMapStringToNode::Serialize(CArch& ar)
{
  string key,val,s1="CMapStringToNode";
  int Count;
  CPNode *pNode=NULL;
  if (ar.IsStoring()) {
    Count = mpn.size();
    ar<<Count<<s1;
    for (ipn=mpn.begin(); ipn!=mpn.end();)  {
      GetNextAssoc(s1, pNode);
      ar<<s1;
      pNode->Serialize(ar);
    }
  }
  else
  {
    ar>>Count>>key;
    if (key !=s1) { throw (-33);  }

    for(int i=0; i<Count; i++) {
      pNode = new CPNode;
      ar>>key;
      pNode->Serialize(ar);
      mpn[key]=pNode;
    }
  }
}
Beispiel #3
0
//-------------------------------------------------------
void CPNodeArraySmall::Serialize(CArch& ar)
{
  string key, s1="CPNodeArray";
  CPNode *pNode;
  int Count,i;
  if (ar.IsStoring()) {
    Count = apn.size();
    ar<<Count<<s1;

    for (i=0; i<Count;i++)  {
      apn[i]->Serialize(ar);
    }
  }
  else
  {
    ar>>Count>>key;
    if (key !=s1)  { throw (-32);  }

    for(i=0; i<Count; i++) {
      pNode = new CPNode;
      pNode->Serialize(ar);
      apn.push_back(pNode);
    }
  }
}
Beispiel #4
0
void CMapStringToType::Serialize(CArch& ar)
{
  string key, s1="CMapStringToType";
  CSFType *pType;
  int Count;
  if (ar.IsStoring()) {
    Count = mtp.size();
    ar<<Count<<s1;
    itp=mtp.begin();
    for (; itp!=mtp.end();)  {
      GetNextAssoc(s1, *&pType);
      pType->Serialize(ar);
    }
  }
  else
  {
    ar>>Count>>key;
    if (key !=s1)  { throw (-7);  }

    for(int i=0; i<Count; i++) {
      pType = new CSFType;
      pType->Serialize(ar);
      mtp[pType->m_Name]=pType;
    }
  }
}
Beispiel #5
0
void CPNode::Serialize(CArch& ar)
{
  if (ar.IsStoring())    {   // storing code here
    ar<<m_PldName; ar<<m_level; ar<<m_NumStringInView;
  }
  else    {                 // loading code here
    ar>>m_PldName; ar>>m_level; ar>>m_NumStringInView;
    m_pSF = new CSF;
  }
  m_pSF->Serialize(ar);
  m_Attr.Serialize(ar);
  m_Children.Serialize(ar); 
}
Beispiel #6
0
//---------------------------------------------------------------
void CSFType::Serialize(CArch& ar)
{
  if (ar.IsStoring())
  {
    ar <<  m_Name <<  m_Lib <<  m_Reg;
  }
  else
  {
    ar >>  m_Name >>  m_Lib >>  m_Reg;
  }
  m_SFVarArray.Serialize(ar);
  Seria(m_ElemArray, ar);
}
Beispiel #7
0
//-------------------------------------------------------
void CSFVar::Serialize(CArch& ar)
{
  if (ar.IsStoring())
  {
    ar <<  m_Name;
    ar <<  m_Typ;
    ar <<  m_First << m_Last << m_NumInSF;
  }
  else
  {
    ar >>  m_Name;
    ar >>  m_Typ;
    ar >>  m_First >> m_Last >> m_NumInSF;
  }
}
Beispiel #8
0
//---------------------------------------------------------------
void CSFunction::Serialize(CArch& ar)
{
  if (ar.IsStoring())
  {
    ar <<  m_Typ;
    ar << m_NumInt;
    ar << m_NumOut;
    ar << m_NumInter;
  }
  else
  {
    ar >>  m_Typ;
    ar >> m_NumInt;
    ar >> m_NumOut;
    ar >> m_NumInter;
  }
  Seria(m_Text, ar);
}
Beispiel #9
0
void CSFVarArray::Serialize(CArch& ar)
{
  CSFVar* pVar;
  int i, Count = Avar.size();
  string key, s1="CSFVarArray";
  if (ar.IsStoring()) {
    ar<<Count<<s1;
    for (i=0;i<Count; i++) {
      pVar =Avar[i];
      pVar->Serialize(ar);
    }
  }
  else {
    ar>>Count>>key;
    if (key !=s1)  { throw (-6);  }

    for(int i=0; i<Count; i++) {
      pVar = new CSFVar;
      pVar->Serialize(ar);
      Avar.push_back(pVar);
    }
  }
}
Beispiel #10
0
//--------------------------------------------- void Serialize(CArch&);
void CMapValFrame::Serialize(CArch& ar)
{
  string key,val,s1="CMapValFrame";
  int Count;
  if (ar.IsStoring()) {
    Count = mvf.size();
    ar<<Count<<s1;
    ivf=mvf.begin();
    for (; ivf!=mvf.end();)  {
      s1 = ivf->first; val = ivf->second; ivf++;
      ar << s1 << val;
    }
  }
  else
  {
    ar>>Count>>key;
    if (key !=s1) { throw (-31);  }

    for(int i=0; i<Count; i++) {
      ar >> key >> val;
      mvf[key]=val;
    }
  }
}
Beispiel #11
0
//---------------------------------------------------------------
void CSFConnect::Serialize(CArch& ar)
{
  if (ar.IsStoring()) { ar <<  m_Name; }
  else                { ar >>  m_Name; }
  Seria(m_Connect, ar);
}