Click here to Skip to main content
11,428,281 members (62,101 online)
Click here to Skip to main content
Add your own
alternative version

A policy based reference counting implementation for compound objects

, 26 May 2005 CPOL
Reference counting smart pointers and handles of various flavours.
////////////////////////////////
// dependency.h

#pragma once
#pragma message( "Compiling " __FILE__ )

#ifndef _CPPRTTI
#error RTTI required: set runtime type ON in your copiler
#endif

//disable unnecessary warnings
#pragma warning(disable: 4250) //inheritance by dominance is by design
#pragma warning(disable: 4100) //unreferenced parameters are by design
#pragma warning(disable: 4189) //unreferenced variable can be by design
#pragma warning(disable: 4201) //unnamed struct and union are by design
#pragma warning(disable: 4512) //unassingable object are by design

//Global symbols
#ifndef interface
#define interface struct
#endif

typedef size_t point_t;

#ifndef SELECTANY_ 
#define SELECTANY_ _declspec(selectany)
#endif

#pragma message( "- Compiling stdlib and CRT" ) 
#include <stdlib.h>
#include <crtdbg.h>
//gererally used files
#include <stdio.h>
#include <stdarg.h>
#include <tchar.h>
#include <typeinfo.h>

#ifndef ASSERT
#define ASSERT _ASSERTE
#ifdef _DEBUG
#define VERIFY(f) ASSERT(f)
#else
#define VERIFY(f) (f)
#endif
#endif

//some STL headers
#pragma message( "- Compiling STL headers" ) 
#include <functional>
#include <utility>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <hash_map>
#include <deque>
#include <stack>
#include <queue>

//some STDX always used stable headers
#include "trace.h"
#include "helpers.h"

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Emilio Garavaglia
Architect
Italy Italy
Born and living in Milan (Italy), I'm an engineer in electronics actually working in the ICT department of an important oil/gas & energy company as responsible for planning and engineering of ICT infrastructures.
Interested in programming since the '70s, today I still define architectures for the ICT, deploying dedicated specific client application for engineering purposes, working with C++, MFC, STL, and recently also C# and D.

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.150428.2 | Last Updated 27 May 2005
Article Copyright 2005 by Emilio Garavaglia
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid