Design Pattern Examples
Overview of object-oriented design patterns
Flyweight_Image.h
Go to the documentation of this file.
1
6
7#pragma once
8#ifndef __FLYWEIGHT_IMAGE_H__
9#define __FLYWEIGHT_IMAGE_H__
10
11#include "Flyweight_Context.h"
12
16typedef struct
17{
23
29
31
32
40typedef struct
41{
43 size_t images_count;
44
46
47
55
65
66#endif // __FLYWEIGHT_IMAGE_H__
Declaration of the Flyweight_Context structure that is associated with a Flyweight_Image as used in t...
void Flyweight_ImageList_Clear(Flyweight_ImageList *imageList)
Clear the given Flyweight_ImageList object by freeing up all allocated Flyweight_image objects and re...
void Flyweight_ImageList_Add(Flyweight_ImageList *imageList, Flyweight_Image *image)
Add a Flyweight_Image object to the given Flyweight_ImageList object. The list takes ownership of the...
Represents the context for an instance of the Flyweight_Image structure. In this case,...
Represents an image that associates a context with a big resource.
Flyweight_Context Context
The context associated with this image. The calling entity uses this context to manipulate the positi...
int BigResourceId
The big resource being referenced by this flyweight image. This is represented by a handle to the big...
Represents an expandable list of Flyweight_Image objects. This is managed by the Flyweight_ImageList_...
size_t images_count
Number of Flyweight_image objects in the list.
Flyweight_Image * images
Dynamic list of Flyweight_Image objects.