- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Utils/Containers/ObjectQueue.h

    00001
    00002 //
    00003 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00004 // All Rights Reserved          Massachusetts Institute of Technology
    00005 //
    00006 // This software is provided as is. Model-based Embedded and Robotic Systems
    00007 // (MERS) group does not assume any responsibility.
    00008 //
    00009 // Organization:        Model-based Embedded and Robotic Systems Group
    00010 //                                      Massachusetts Institute of Technology
    00011 //
    00013
    00014 #if !defined(AFX_OBJECTQUEUE_H__F82113C7_2929_4F97_8222_AEBBD9420E2D__INCLUDED_)
    00015 #define AFX_OBJECTQUEUE_H__F82113C7_2929_4F97_8222_AEBBD9420E2D__INCLUDED_
    00016
    00017 #if _MSC_VER > 1000
    00018 #pragma once
    00019 #endif // _MSC_VER > 1000
    00020
    00021 #include "DynamicQueue.h"
    00022
    00023 namespace Mers {
    00024         namespace Utils {
    00025                 namespace Containers {
    00026
    00032                         class ObjectQueue : public DynamicQueue
    00033                         {
    00034                         public:
    00035                                 //-----------------------------------------
    00036                                 // Constructors
    00037                                 //-----------------------------------------
    00038
    00052                                 ObjectQueue(bool myOwnershipStatus, int myMaxQueueSize = -1);
    00053
    00054                                 //-----------------------------------------
    00055                                 // Destructors
    00056                                 //-----------------------------------------
    00057
    00061                                 virtual ~ObjectQueue();
    00062
    00063                                 //-----------------------------------------
    00064                                 // Functions
    00065                                 //-----------------------------------------
    00066
    00076                                 virtual int enqueue(BaseModelObject * element);
    00086                                 virtual int dequeue(BaseModelObject * &element);
    00096                                 virtual int peekQueue(BaseModelObject * &element);
    00097
    00098                         protected:
    00099                                 //-----------------------------------------
    00100                                 // Functions
    00101                                 //-----------------------------------------
    00102 #ifndef EMBEDDED
    00103
    00113                                 virtual void printElement(std::ostream &out, void const * element) const;
    00114 #endif
    00115
    00123                                 virtual void deleteElement(void * element) const;
    00132                                 virtual void * newElement(void const * element) const;
    00133
    00134                         };
    00135                 }
    00136         }
    00137 }
    00138
    00139 #endif // !defined(AFX_OBJECTQUEUE_H__F82113C7_2929_4F97_8222_AEBBD9420E2D__INCLUDED_)