Public Member Functions | List of all members
Resource Class Reference

#include <nap/resource.h>

Public Member Functions

 Resource ()
- Public Member Functions inherited from Object
 Object ()
virtual ~Object ()
virtual bool init (utility::ErrorState &errorState)
virtual void onDestroy ()
 Object (Object &)=delete
Objectoperator= (const Object &)=delete
 Object (Object &&)=delete
Objectoperator= (Object &&)=delete

Additional Inherited Members

- Static Public Member Functions inherited from Object
static bool isIDProperty (rtti::Instance &object, const rtti::Property &property)
- Public Attributes inherited from Object
std::string mID
 Property: 'mID' unique name of the object. Used as an identifier by the system. More...


A resource is a small, stand-alone building block that can be authored in JSON. Resources are used to load an image from disk, define a three-dimensional shape, create a render window, etc. Derive from this class to create your own resource and implement the init() call to initialize the object after de-serialization. Override the onDestroy() method to perform additional clean-up steps.

Inherits Object.

Inherited by APIBaseValue, APIMessage, APISignature, AudioBufferResource, BaseFillPolicy, BaseMaterial, BaseShader, BaseVertexAttribute, Bitmap, BufferBinding, CalendarItem, Component, CVAdapter, Device, Entity, Font, GPUBuffer, ICalendar, Icon, IGroup, IMesh, FCurve< T, V >, Parameter, ParameterBlendGroup, ParameterGUI, GpioPin, PortalItem, PublicKey, PythonScript, RenderTarget, Sampler, Scene, SDOArgument, SDOGroup, Sequence, SequenceEditor, SequenceEditorGUI, SequenceMarker, SequencePlayerClock, SequencePlayerOutput, SequenceTrack, SequenceTrackSegment, Snapshot, StructFillPolicy, StructFillPolicy::BaseEntry, Texture2D, Uniform, VideoFile, WebSocketInterface, WebSocketTicket, and Window.

Collaboration diagram for Resource:

Constructor & Destructor Documentation

◆ Resource()

Resource ( )