Skip to content

File Enumeration.h

File List > GenApiNet > Enumeration.h

Go to the documentation of this file

//-----------------------------------------------------------------------------
//  (c) 2007 by STEMMER IMAGING
//  Author:  Sascha Dorenbeck
//  $Header:
//
//  License: This file is published under the license of the EMVA GenICam  Standard Group.
//  A text file describing the legal terms is included in  your installation as 'GenICam_license.pdf'.
//  If for some reason you are missing  this file please contact the EMVA or visit the website
//  (http://www.genicam.org) for a full copy.
//
//  THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM STANDARD GROUP "AS IS"
//  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
//  THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
//  PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM STANDARD  GROUP
//  OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,  SPECIAL,
//  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT  LIMITED TO,
//  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,  DATA, OR PROFITS;
//  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY  THEORY OF LIABILITY,
//  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT  (INCLUDING NEGLIGENCE OR OTHERWISE)
//  ARISING IN ANY WAY OUT OF THE USE  OF THIS SOFTWARE, EVEN IF ADVISED OF THE
//  POSSIBILITY OF SUCH DAMAGE.
//-----------------------------------------------------------------------------

#pragma once

#include "Node.h"
#include "EnumValue.h"
#include "Value.h"
#include "EnumEntry.h"

namespace Spinnaker{
    namespace GenApi
    {
        interface IEnumeration;
    }
}

namespace SpinnakerNET
{
    namespace GenApi
    {
        ref class EnumEntry;

#pragma region Enum Interface
        public interface class IEnum
            : public SpinnakerNET::GenApi::IValue
        {
            property array<EnumEntry^> ^ Entries
            {
                array<EnumEntry^> ^ __clrcall get(void);
            }

            property array<::System::String^> ^ Symbolics
            {
                array<::System::String^> ^ __clrcall get(void);
            }

            property EnumValue Value
            {
                EnumValue __clrcall get(void);
                void __clrcall set(EnumValue value);
            }

            IEnumEntry ^ __clrcall GetEntryByName(::System::String ^ name);
        };
#pragma endregion

        public ref class Enumeration
            : public Node
              , public SpinnakerNET::GenApi::IEnum
        {
#pragma region Ctor/Dtor
            public:
                __clrcall Enumeration(SpinnakerNET::GenApi::NodeMap ^map, IntPtr handle);

                __clrcall Enumeration(SpinnakerNET::GenApi::INode ^obj);

                __clrcall !Enumeration(void);

                virtual __clrcall ~Enumeration(void);
#pragma endregion

#pragma region Node Methods
            public:
                virtual void __clrcall FromString(::System::String ^value);

                virtual ::System::String^ __clrcall ToString (void) override;
#pragma endregion

#pragma region Enumeration Properties/Methods
            public:
                virtual property array<EnumEntry^> ^ Entries
                {
                    array<EnumEntry^> ^ __clrcall get(void) sealed;
                }

                virtual property array<::System::String^> ^ Symbolics
                {
                    array<::System::String^> ^ __clrcall get(void) sealed;
                }

                virtual property EnumValue Value
                {
                    EnumValue __clrcall get(void) sealed;
                    void __clrcall set(EnumValue value) sealed;
                }

                virtual IEnumEntry ^ __clrcall GetEntryByName(::System::String ^ name);

#pragma endregion

#pragma region Value Operators
            public:
                static operator ::System::String ^ (Enumeration ^obj) { return obj->Value; }

                static operator __int64(Enumeration ^obj) { return obj->Value; }

                Enumeration ^ operator = (::System::String ^value) { Value = value; return this; }

                Enumeration ^ operator = (__int64 value) { Value = value; return this; }
#pragma endregion

#pragma region Member
            private:
                ::Spinnaker::GenApi::IEnumeration * enumHandle;
#pragma endregion
        };
    }
}