Design Pattern Examples
Overview of object-oriented design patterns
c Directory Reference
Directory dependency graph for c:
c

Directories

directory  helpers
 

Files

file  Adapter_Exercise.c [code]
 Implementation of the Adapter_Exercise() function as used in the Adapter Pattern.
 
file  c/Adapter_Exercise.h [code]
 Declaration of the Adapter_Exercise() function as used in the Adapter Pattern.
 
file  Adapter_Functions.c [code]
 Implementation of the Adapter functions used in the Adapter Pattern.
 
file  Adapter_Functions.h [code]
 Declaration of the Adapter functions used in the Adapter Pattern.
 
file  Bridge_ConsoleLogger.c [code]
 Implementation of the console logger, along with the CreateConsoleLogger() and DestroyConsoleLogger() factory functions used in the Bridge Pattern.
 
file  c/Bridge_ConsoleLogger.h [code]
 Declaration of the CreateConsoleLogger() and DestroyConsoleLogger() factory functions used in the Bridge Pattern.
 
file  Bridge_Exercise.c [code]
 Implementation of the Bridge_Exercise() function as used in the Bridge Pattern.
 
file  c/Bridge_Exercise.h [code]
 Declaration of the Bridge_Exercise() function as used in the Bridge Pattern.
 
file  Bridge_FileLogger.c [code]
 Implementation of the file logger, along with the CreateFileLogger() and DestroyFileLogger() factory functions used in the Bridge Pattern.
 
file  c/Bridge_FileLogger.h [code]
 Declaration of the CreateFileLogger() and DestroyFileLogger() factory functions used in the Bridge Pattern.
 
file  Bridge_ILogger.c [code]
 Implementation of the CreateLogger() and DestroyLogger() functions used in the Bridge Pattern.
 
file  Bridge_ILogger.h [code]
 Declaration of the ILogger interface, along with the CreateLogger() and DestroyLogger() functions used in the Bridge Pattern.
 
file  Bridge_LogHelper.c [code]
 Implementation of the LogHelper_FormatLogLine() function, used in the Bridge Pattern.
 
file  Bridge_LogHelper.h [code]
 Declaration of the LogHelper_FormatLogLine() function, used in the Bridge Pattern.
 
file  Bridge_NullLogger.c [code]
 Implementation of the null logger, along with the CreateNullLogger() and DestroyNullLogger() factory functions used in the Bridge Pattern.
 
file  c/Bridge_NullLogger.h [code]
 Declaration of the CreateNullLogger() and DestroyNullLogger() factory functions used in the Bridge Pattern.
 
file  Command_Command.c [code]
 Implementation of the Command structure and associated functions as used in the Command Pattern.
 
file  Command_Command.h [code]
 Declaration of the Command structure and associated functions as used in the Command Pattern.
 
file  Command_Exercise.c [code]
 Implementation of the Command_Exercise() function as used in the Command Pattern.
 
file  c/Command_Exercise.h [code]
 Declaration of the Command_Exercise() function as used in the Command Pattern.
 
file  Command_TextObject.c [code]
 Implementation of the Command_TextObject structure and associated functions as used in the Command Pattern.
 
file  Command_TextObject.h [code]
 Declaration of the Command_TextObject structure and associated functions as used in the Command Pattern.
 
file  Composite_Exercise.c [code]
 Implementation of the Composite_Exercise() function as used in the Composite Pattern.
 
file  c/Composite_Exercise.h [code]
 Declaration of the Composite_Exercise() function as used in the Composite Pattern.
 
file  Composite_FileAccess.c [code]
 Implementation of the Composite_FileAccess_GetEntry() function along with the static file/directory list used in the example for the Composite Pattern.
 
file  c/Composite_FileAccess.h [code]
 Declaration of the Composite_FileAccess_GetEntry() function used in the Composite Pattern.
 
file  Composite_FileDirEntry.c [code]
 Implementation of the FileDirEntry_GetFileDirType(), FileDirEntry_GetLength(), FileDirEntry_GetChildren(), FileDirEntry_GetName(), and FileDirEntry_GetWhenModified() functions as used in support of the Composite Pattern example.
 
file  c/Composite_FileDirEntry.h [code]
 Declaration of the FileDirEntry, FileEntry, DirEntry structures, along with the FileDirEntry_GetFileDirType(), FileDirEntry_GetLength(), FileDirEntry_GetChildren(), FileDirEntry_GetName(), and FileDirEntry_GetWhenModified() functions as used in support of the Composite Pattern example.
 
file  Decorator_Exercise.c [code]
 Implementation of the various decorator functions that are called from the Decorator_Exercise() function as used in the Decorator Pattern.
 
file  c/Decorator_Exercise.h [code]
 Declaration of the Decorator_Exercise() function as used in the Decorator Pattern.
 
file  Facade_ComplexSystem.c [code]
 Implementation of the IDeviceNetworkLowLevel interface and the complex system it represents for the Facade Pattern.
 
file  Facade_ComplexSystem.h [code]
 Declaration of the IDeviceNetworkLowLevel interface representing the complex system for the Facade Pattern.
 
file  Facade_Exercise.c [code]
 Implementation of the Facade_Exercise() function as used in the Facade Pattern.
 
file  c/Facade_Exercise.h [code]
 Declaration of the Facade_Exercise() function as used in the Facade Pattern.
 
file  Facade_Interface.c [code]
 Implementation of the IDeviceNetworkHighLevel interface and the simplified implementation on top of the complex system for the Facade Pattern.
 
file  c/Facade_Interface.h [code]
 Declaration of the IDeviceNetworkHighLevel interface representing the high-level system used in the Facade Pattern.
 
file  Flyweight_BigResource.c [code]
 Implementation of the BigResource_Clear() function and the BigResource_Render() function used to render portions of the big resource into a "display" window as used in the Flyweight Pattern.
 
file  Flyweight_BigResource.h [code]
 Declaration of the BigResource structure along with the supporting BigResource_Clear function. Also declares the BigResource_Render() function used to render portions of the big resource into a "display" window as used in the Flyweight Pattern.
 
file  Flyweight_BigResourceManager.c [code]
 Implementation of the BigResourceList structure and its supporting functions, along with the Big Resource Manager functions, BigResourceManager_Clear(), BigResourceManager_AddResource(), and BigResourceManager_GetResource(), used in the Flyweight Pattern.
 
file  Flyweight_BigResourceManager.h [code]
 Declaration of the Big Resource Manager functions, BigResourceManager_Clear(), BigResourceManager_AddResource(), and BigResourceManager_GetResource(), used in the Flyweight Pattern.
 
file  Flyweight_Context.h [code]
 Declaration of the Flyweight_Context structure that is associated with a Flyweight_Image as used in the Flyweight Pattern.
 
file  Flyweight_Display.c [code]
 Implementation of the Display_Create() and Display_Destroy() functions for managing the Display structure that represents a "display" windows as used in the Flyweight Pattern.
 
file  Flyweight_Display.h [code]
 Declaration of the Display_Create() and Display_Destroy() functions for managing the Display structure that represents a "display" windows as used in the Flyweight Pattern.
 
file  Flyweight_Exercise.c [code]
 Implementation of the Flyweight_Exercise() function as used in the Flyweight Pattern.
 
file  c/Flyweight_Exercise.h [code]
 Declaration of the Flyweight_Exercise() function as used in the Flyweight Pattern.
 
file  Flyweight_Image.c [code]
 Implementation of the Flyweight_ImageList and Flyweight_Image structures, the latter which wraps the big resource handle and a Flyweight_Context as used in the Flyweight Pattern.
 
file  Flyweight_Image.h [code]
 Declaration of the Flyweight_ImageList and Flyweight_Image structures, the latter which wraps the big resource handle and a Flyweight_Context as used in the Flyweight Pattern.
 
file  HandlerChain_Exercise.c [code]
 Implementation of the HandlerChain_Exercise() function as used in the HandlerChain Pattern.
 
file  c/HandlerChain_Exercise.h [code]
 Declaration of the HandlerChain_Exercise() function as used in the HandlerChain Pattern.
 
file  HandlerChain_HandlerFunctions.c [code]
 Implementation of the Handler Chain functions, HandlerChain_SendMessage(), HandlerChain_AddWindow(), HandlerChain_RemoveWindow(), and HandlerChain_ToString(), as used in the HandlerChain Pattern.
 
file  HandlerChain_HandlerFunctions.h [code]
 Declaration of the Handler Chain functions, HandlerChain_SendMessage(), HandlerChain_AddWindow(), HandlerChain_RemoveWindow(), and HandlerChain_ToString(), as used in the HandlerChain Pattern.
 
file  HandlerChain_Message.c [code]
 Implementation of the Message and MessagePosition structures, along with the functions, MessagePosition_ToString(), Message_Initialize(), and Message_ToString(), as used in the HandlerChain Pattern.
 
file  HandlerChain_Message.h [code]
 Declaration of the Message and MessagePosition structures, along with the functions, MessagePosition_ToString(), Message_Initialize(), and Message_ToString(), as used in the HandlerChain Pattern.
 
file  HandlerChain_MessageWindow.c [code]
 Declaration of the MessageWindow structure, along with the implementation of the support functions, MessageWindow_Create(), MessageWindow_Destroy(), MessageWindow_ProcessMessage(), and MessageWindow_ToString(), as used in the HandlerChain Pattern.
 
file  HandlerChain_MessageWindow.h [code]
 Declaration of the MessageWindow support functions, MessageWindow_Create(), MessageWindow_Destroy(), MessageWindow_ProcessMessage(), and MessageWindow_ToString(), as used in the HandlerChain Pattern.
 
file  HandlerChain_WindowRectangle.c [code]
 Implementation of the WindowRectangle support functions, WindowRectangle_Initialize(), WindowRectangle_PointInside(), and WindowRectangle_ToString(), as used in the HandlerChain Pattern.
 
file  HandlerChain_WindowRectangle.h [code]
 Declaration of the WindowRectangle structure and its support functions, WindowRectangle_Initialize(), WindowRectangle_PointInside(), and WindowRectangle_ToString(), as used in the HandlerChain Pattern.
 
file  Interpreter_Exercise.c [code]
 Implementation of the Interpreter_Exercise() function as used in the Interpreter Pattern.
 
file  c/Interpreter_Exercise.h [code]
 Declaration of the Interpreter_Exercise() function as used in the Interpreter Pattern.
 
file  Interpreter_Interpreter.c [code]
 Implementation of the Interpreter_Interpret() function used in the Interpreter Pattern.
 
file  Interpreter_Interpreter.h [code]
 Declaration of the Interpreter_Interpret() function used in the Interpreter Pattern.
 
file  Iterator_Exercise.c [code]
 Implementation of the Iterator_Exercise() function as used in the Iterator Pattern.
 
file  c/Iterator_Exercise.h [code]
 Declaration of the Iterator_Exercise() function as used in the Iterator Pattern.
 
file  Iterator_Iterators.c [code]
 Implementation of the iterator functions, Iterator_GetItems(), Iterator_GetKeys(), Iterator_GetValues(), Iterator_NextItem(), Iterator_NextKey(), and Iterator_NextValue(), as used in the Iterator Pattern.
 
file  Iterator_Iterators.h [code]
 Declaration of the ItemPair structure, along with the iterator functions, Iterator_GetItems(), Iterator_GetKeys(), Iterator_GetValues(), Iterator_NextItem(), Iterator_NextKey(), and Iterator_NextValue(), as used in the Iterator Pattern.
 
file  Mediator_Exercise.c [code]
 Implementation of the Mediator_Exercise() function as used in the Mediator Pattern.
 
file  c/Mediator_Exercise.h [code]
 Declaration of the Mediator_Exercise() function as used in the Mediator Pattern.
 
file  Mediator_Functions.c [code]
 The front end of the Mediator system that mediates between the Users and the Groups sub-systems. Contains the implementation of the Mediator functions as used in the Mediator Pattern.
 
file  Mediator_Functions.h [code]
 The front end of the Mediator system that mediates between the Users and the Groups sub-systems. Contains the declarations of the Mediator functions as used in the Mediator Pattern.
 
file  Mediator_Group.c [code]
 Implementation the Group support functions as used in the Mediator Pattern.
 
file  Mediator_Group.h [code]
 Declaration of the Group structure and the associated support functions as used in the Mediator Pattern.
 
file  Mediator_GroupList.c [code]
 Implementation of the GroupList structure's support functions as used in the Mediator Pattern.
 
file  Mediator_GroupList.h [code]
 Declaration of the GroupList structure and the associated support functions as used in the Mediator Pattern.
 
file  Mediator_Groups.c [code]
 The front end of the Groups sub-system. Contains the implementation of the Group support functions as used in the Mediator Pattern.
 
file  Mediator_Groups.h [code]
 The front end of the Groups sub-system. Contains the declarations of the support functions for working with groups as used in the Mediator Pattern.
 
file  Mediator_User.c [code]
 Implementation of the User support functions as used in the Mediator Pattern.
 
file  Mediator_User.h [code]
 Declaration of the User structure and the associated support functions as used in the Mediator Pattern.
 
file  Mediator_UserList.c [code]
 IMplementation of the UserList support functions as used in the Mediator Pattern.
 
file  Mediator_UserList.h [code]
 Declaration of the UserList structure and the associated support functions as used in the Mediator Pattern.
 
file  Mediator_Users.c [code]
 The front end of the Users sub-system. Contains the implementation of the support functions for working with users as used in the Mediator Pattern.
 
file  Mediator_Users.h [code]
 The front end of the Users sub-system. Contains the declarations of the support functions for working with users as used in the Mediator Pattern.
 
file  Memento_Exercise.c [code]
 Implementation of the Memento_Exercise() function as used in the Memento Pattern.
 
file  c/Memento_Exercise.h [code]
 Declaration of the Memento_Exercise() function as used in the Memento Pattern.
 
file  Memento_Memento.c [code]
 Implementation of the Memento structure's support functions, Memento_Create() and Memento_Destroy(), as used in the Memento Pattern.
 
file  Memento_Memento.h [code]
 Declaration of the Memento structure and support functions, Memento_Create() and Memento_Destroy(), as used in the Memento Pattern.
 
file  Memento_TextObject.c [code]
 Implementation of the Memento_TextObject structure's support functions, Memento_TextObject_Create(), Memento_TextObject_Destroy(), Memento_TextObject_GetText(), Memento_TextObject_SetText(), and Memento_TextObject_ToString(), as used in the Memento Pattern.
 
file  Memento_TextObject.h [code]
 Declaration of the Memento_TextObject structure and support functions, Memento_TextObject_Create(), Memento_TextObject_Destroy(), Memento_TextObject_GetText(), Memento_TextObject_SetText(), and Memento_TextObject_ToString(), as used in the Memento Pattern.
 
file  NullObject_Exercise.c [code]
 Implementation of the NullObject_Exercise() function as used in the Null Object Pattern.
 
file  c/NullObject_Exercise.h [code]
 Declaration of the NullObject_Exercise() function as used in the Null Object Pattern.
 
file  NullObject_MoveCommand.c [code]
 Implementation of the MoveCommand structure's support functions, MoveCommand_Create() and MoveCommand_Destroy(), as used in the Null Object Pattern.
 
file  NullObject_MoveCommand.h [code]
 Declaration of the MoveCommand structure along with the support functions, MoveCommand_Create() and MoveCommand_Destroy(), as used in the Null Object Pattern.
 
file  NullObject_MoveCommandList.c [code]
 Implementation of the MoveCommandList structure's support functions, MoveCommandList_Initialize(), MoveCommandList_Clear(), and MoveCommandList_Add(), as used in the Null Object Pattern.
 
file  NullObject_MoveCommandList.h [code]
 Declaration of the MoveCommandList structure along with the support functions, MoveCommandList_Initialize(), MoveCommandList_Clear(), and MoveCommandList_Add(), as used in the Null Object Pattern.
 
file  Observer_Exercise.c [code]
 Implementation of the Observer_Exercise() function as used in the Observer Pattern.
 
file  c/Observer_Exercise.h [code]
 Declaration of the Observer_Exercise() function as used in the Observer Pattern.
 
file  Observer_NumberChangedFunctionList.c [code]
 Implementation of the NumberChangedFunctionList structure's support functions, NumberChangedFunctionList_Initialize(), NumberChangedFunctionList_Clear(), NumberChangedFunctionList_Add(), NumberChangedFunctionList_Find(), NumberChangedFunctionList_Remove(), and NumberChangedFunctionList_Copy(), as used in the Observer Pattern.
 
file  Observer_NumberChangedFunctionList.h [code]
 Declaration of the NumberChangedFunctionList structure along with its support functions, NumberChangedFunctionList_Initialize(), NumberChangedFunctionList_Clear(), NumberChangedFunctionList_Add(), NumberChangedFunctionList_Find(), NumberChangedFunctionList_Remove(), and NumberChangedFunctionList_Copy(), as used in the Observer Pattern.
 
file  Observer_NumberProducer.c [code]
 Declaration of the NumberProducer structure along with its support functions, NumberProducer_Create(), NumberProducer_Destroy(), NumberProducer_SubscribeToNumberChanged(), NumberProducer_UnsubscribeFromNumberChanged(), and NumberProducer_UpdateNumber(), as used in the Observer Pattern.
 
file  Observer_NumberProducer.h [code]
 Declaration of the NumberProducer structure along with its support functions, NumberProducer_Create(), NumberProducer_Destroy(), NumberProducer_SubscribeToNumberChanged(), NumberProducer_UnsubscribeFromNumberChanged(), and NumberProducer_UpdateNumber(), as used in the Observer Pattern.
 
file  program.c [code]
 Implementation of the main() entry point and the machinery to call all the design pattern example functions. See Main Overview.
 
file  Proxy_Exercise.c [code]
 Implementation of the Proxy_Exercise() function as used in the Proxy Pattern.
 
file  c/Proxy_Exercise.h [code]
 Declaration of the Proxy_Exercise() function as used in the Proxy Pattern.
 
file  Proxy_IWorkByProxy.h [code]
 Declaration of the IWorkByProxy structure, which represents both the real service and the proxy service, as used in the Proxy Pattern.
 
file  Proxy_ProxyService.c [code]
 Implementation of the proxy service, accessed through the GetProxyService() function, as used in the Proxy Pattern.
 
file  Proxy_ProxyService.h [code]
 Declaration of the proxy service, accessed through the GetProxyService() function, as used in the Proxy Pattern.
 
file  Proxy_RealService.c [code]
 Implementation of the real service, accessed through the GetRealService() function, as used in the Proxy Pattern.
 
file  Proxy_RealService.h [code]
 Declaration of the real service, accessed through the GetRealService() function, as used in the Proxy Pattern.
 
file  c/resource.h [code]
 
file  State_Exercise.c [code]
 Implementation of the State_Exercise() function as used in the State Pattern.
 
file  c/State_Exercise.h [code]
 Declaration of the State_Exercise() function as used in the State Pattern.
 
file  State_RemoveComments.c [code]
 Implementation of the State_RemoveComments() function, along with the state machine used to filter out comments out of a piece of source code, as used in the State Pattern.
 
file  State_RemoveComments.h [code]
 Declaration of the State_RemoveComments() function that uses a state machine to filter out comments out of a piece of source code, as used in the State Pattern.
 
file  Strategy_Exercise.c [code]
 Implementation of the Strategy_Exercise() function as used in the Strategy Pattern.
 
file  c/Strategy_Exercise.h [code]
 Declaration of the Strategy_Exercise() function as used in the Strategy Pattern.
 
file  Strategy_SortStrategy.c [code]
 Implementation of the SortStrategy structure and the SortStrategy_Initialize() function, along with the individual strategies, as used in the Strategy Pattern.
 
file  Strategy_SortStrategy.h [code]
 Declaration of the SortStrategy structure and the SortStrategy_Initialize() function as used in the Strategy Pattern.
 
file  Visitor_Exercise.c [code]
 Implementation of the Visitor_Exercise() function as used in the Visitor Pattern.
 
file  c/Visitor_Exercise.h [code]
 Declaration of the Visitor_Exercise() function as used in the Visitor Pattern.
 
file  Visitor_OrderVisitor.c [code]
 Implementation of the OrderVisitor structure's supporting functions, OrderVisitor_Initialize(), OrderVisitor_Clear(), and OrderVisitor_VisitShop(), as used in the Visitor Pattern.
 
file  Visitor_OrderVisitor.h [code]
 Declaration of the OrderVisitor structure and its supporting functions, OrderVisitor_Initialize(), OrderVisitor_Clear(), and OrderVisitor_VisitShop(), as used in the Visitor Pattern.
 
file  Visitor_Shop.c [code]
 Implementation of the Visitor_Shop structure's supporting functions, Shop_Create(), Shop_Destroy(), Shop_PlaceOrder(), and Shop_PickupOrder(), as used in the Visitor Pattern.
 
file  c/Visitor_Shop.h [code]
 Declaration of the Visitor_Shop structure and its supporting functions, Shop_Create(), Shop_Destroy(), Shop_PlaceOrder(), and Shop_PickupOrder(), as used in the Visitor Pattern.
 
file  Visitor_Village.c [code]
 Implementation of the Village structure's support functions, Village_Initialize(), Village_Clear(), Village_Load(), Village_AddShop(), and Village_VisitShop(), as used in the Visitor Pattern.
 
file  c/Visitor_Village.h [code]
 Declaration of the Village structure and its supporting functions, Village_Initialize(), Village_Clear(), Village_Load(), Village_AddShop(), and Village_VisitShop(), as used in the Visitor Pattern.