⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 field.cpp

📁 联通接收发送新程序
💻 CPP
字号:
static const char* sccsid = "@(#)field.cpp v2.0.0 2000-08-28";
/* Copyright(C) 1999, 2000 by JiangSu Bell Software CO.,LTD. */
/*
  Name: field.cpp                      Version: 2.0.0
  Created by HanBing                   Date: 2000-08-08
  Comment: 
  Modified:
2)  2000-08-28	HanBing	-	Modifed to be array_size;
1)  2000-08-08	HanBing	-	Create;
*/

#include "common.h"
#include "field.hpp"

/*
  Class: CField                        Version: 1.0
  Created by HanBing                   Date: 2000-08-08
  Definition File: field.hpp
  Comment: 
  Modified:
1)  2000-08-08	HanBing	-	Create;
*/

/*
  Name: operator = ( CField )
  Comment:      copy a Field to this Field;
  Parameters:   the Field to be copy
  Return Value: this Field
  Modified:
1) 2000-08-08	HanBing	-	Create;
*/
CField& CField :: operator = ( CField& Field )
{
  SetName( Field.Name() );
  SetType( Field.Type(), Field.Len(), BatSize );
  switch ( FieldType )
  {
    case CharT:
      operator = ( Field.Char() );
      break;
    case IntT:
      operator = ( Field.Int() );
      break;
    case FloatT:
      operator = ( Field.Float() );
      break;
  }
  if ( Field.IsNull() )
    SetNull();
  return *this;
}

/*
  Name: Print()
  Comment:      Display the Field's name and value at pos;
  Parameters:   pos - input - the Field's position to be displayed
  Return Value:
  Modified:
2) 2000-08-28	HanBing	-	Modifed to be array_size;
1) 2000-08-08	HanBing	-	Create;
*/
void CField :: Print( uint pos )
{
/*
  if ( IsNull( pos ) )
    cout << "NULL";
  else
  {
    switch ( FieldType )
    {
      case CharT:
        cout << "'" << CharAt( pos ) << "'";
        break;
      case IntT:
        cout << IntAt( pos );
        break;
      case FloatT:
    //    cout << FloatAt( pos );
        break;
      default:
  //      cout << "void";
        break;
    }
  }
  cout << " " << flush;
*/
}
/*
  Name: PrintAll()
  Comment:      Display the Field's name and value all in array;
  Parameters:
  Return Value:
  Modified:
1) 2000-08-28	HanBing	-	Modifed to be array_size;
*/

void CField :: PrintAll()
{
/*
  PrintName();
  cout << endl;
  for ( uint i = 0; i < BatSize; i++ )
  {
    Print( i );
    cout << endl;
  }
*/
};


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -