By skyracer
on Wed, 06/20/2012 - 17:05
I found a very wired thing:
The below is class Tracker.
You will find load( ) is a pure virtual function, which means it is not defined.
However, in the function loadTracker( ), you will see load is called directly, which is not defined yet.
This is a very strange thing. Why a pure virtual function can be run before defined ?
(The sample code is ImageTarget )
class QCAR_API Tracker : private NonCopyable
{
public:
/// Enumeration of the different tracker types
enum TYPE {
IMAGE_TARGET = 1, ///< Tracker type tracks ImageTargets and
///< MultiTargets.
MARKER = 2, ///< Tracker type tracks marker type targets.
ALL = 0xffff ///< Use this to activate all available tracker
///< types.
};
/// Provides access to the Tracker singleton
static Tracker& getInstance();
/// Starts reading the configuration file and initializes all required
/// trackers, then advances internal dataset loading state
/**
* Return value is the progress in percent (0-100).
*
* Load can be called more than once per application lifetime.
* For all subsequent calls it frees all run-time data not required anymore
* and loads new tracking data.
*/
virtual int load() = 0;
Re: load tracker data
Re: load tracker data