NDEVR
API Documentation
DesignObjectSorter.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/SoftwareService.h>
4#include <NDEVR/Buffer.h>
5#include <NDEVR/DesignObject.h>
6#include <NDEVR/UUID.h>
7namespace NDEVR
8{
15 {
16 public:
22 virtual bool canSort(const DesignObject& a, const DesignObject& b) const = 0;
29 virtual bool isAGreaterThanB(const DesignObject& a, const DesignObject& b) const = 0;
34 virtual UUID id() const = 0;
35 };
36
40 class NDEVR_DESIGN_API DesignObjectSorterManager : public SoftwareServiceManager
41 {
42 public:
47 static void AddSorter(DesignObjectSorter* sorter);
57 static void RemoveSorter(UUID id);
58 private:
59 static Buffer<DesignObjectSorter*> s_sorters;
60 };
61}
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Allows for sorting models when supported.
static const Buffer< DesignObjectSorter * > & Sorters()
Returns the list of all registered sorters.
static void RemoveSorter(UUID id)
Removes a sorter from the manager by its unique identifier.
static void AddSorter(DesignObjectSorter *sorter)
Registers a new sorter with the manager.
Allows for sorting models when supported.
virtual bool canSort(const DesignObject &a, const DesignObject &b) const =0
Returns true if it is possible for this sorter to detemine the order of two objects.
virtual bool isAGreaterThanB(const DesignObject &a, const DesignObject &b) const =0
Returns true if a is evaluated to be less than b.
virtual UUID id() const =0
A unique identifier for this sorting service.
A low-level database object that can be used to access general stored properties within the NDEVR Mod...
Software Service Managers take a Software service to modify the behavior of the software.
Base interface for services that extend or modify software behavior through modules.
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
The primary namespace for the NDEVR SDK.