VIZ++ Class: Object

 VIZ++ Class Library  VIZ++ Samples  VIZ++ ClassTree 

Source code

/*
 * Object.h 
 * Copyright (c) 2015 Antillia.com TOSHIYUKI ARAI. ALL RIGHTS RESERVED. 
 */


// SOL9 
// 2016/12/05 Updated 

// 2015/12/19
#pragma warning(disable: 4100)
#pragma warning(disable: 4456) //2017/01/25
#pragma warning(disable: 4458) //2017/01/25
#pragma warning(disable: 4477) //2017/01/25

#pragma once
//212/11/07

#define STRICT_TYPED_ITEMIDS

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>

#include <io.h>
#include <time.h>

#include <winsock2.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>

#include <viz++/Wchardef.h>

#include <windows.h>
#include <tchar.h>
#include <exdisp.h>
#include <mshtml.h>

#include <commctrl.h>
#include <objbase.h>
#include <shlwapi.h>
#include <shlobj.h>
#include <comdef.h>
#include <shellapi.h>
#include <process.h>

#include <locale.h>


#include <viz++\auxdef.h>

#ifdef _SOL32_DISABLE_WARNING
#pragma warning(disable:4996)
#endif

//#include <viz++/Wchardef.h>

#ifdef _DEBUG
#define _soltrace  printf
#else
#define _soltrace
#endif

#include <assert.h>
#include <sys/stat.h>
#include <errno.h>

//2016/12/05
#include <viz++/Exception.h>
#include <viz++/SmartPtr.h>
#include <viz++/UnknownException.h>

namespace VIZ {
/**
 * Class Object. The base class of SOL7 class library.
 */
class Object {
private:
  int id;

public:
  /**
   * Constructor
   */
  Object() { id = 0; }

  /**
   * Destructor
   */
  virtual ~Object() { }

  /**
   * Virtual compare method.
   */
  virtual int   compare(Object* ) { return 0; }

  /**
   * Virutal dump method.
   */
  virtual void  dump() { }

  /**
   * Return id member of this object.
   */
  int    getId() { return id; }  

  /**
   * Set val to the member id of this object
   */
  void  setId(int val) { id = val; }

  /**
   * Virtual toString method.
   */
  //2012/02/25
  virtual _bstr_t toString() { return _bstr_t("Object"); }


};

}

using namespace VIZ;


Last modified: 10 Feb 2017

Copyright (c) 2009-2017 Antillia.com ALL RIGHTS RESERVED.