This is the sample program that can see the decode result of barcode data on Watson IoT.

Dependencies:   AsciiFont DisplayApp GR-PEACH_video LCD_shield_config LWIPBP3595Interface_STA_for_mbed-os USBDevice

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers NamedPointer.h Source File

NamedPointer.h

Go to the documentation of this file.
00001 /**
00002  * @file    NamedPointer.h
00003  * @brief   mbed CoAP Endpoint Device Management Named Pointer (header)
00004  * @author  Doug Anson
00005  * @version 1.0
00006  * @see
00007  *
00008  * Copyright (c) 2016
00009  *
00010  * Licensed under the Apache License, Version 2.0 (the "License");
00011  * you may not use this file except in compliance with the License.
00012  * You may obtain a copy of the License at
00013  *
00014  *     http://www.apache.org/licenses/LICENSE-2.0
00015  *
00016  * Unless required by applicable law or agreed to in writing, software
00017  * distributed under the License is distributed on an "AS IS" BASIS,
00018  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00019  * See the License for the specific language governing permissions and
00020  * limitations under the License.
00021  */
00022 
00023 #ifndef __NAMED_POINTER_H__
00024 #define __NAMED_POINTER_H__
00025 
00026 // String class
00027 #include <string>
00028 
00029 class NamedPointer {
00030 public:
00031     // constructor
00032     NamedPointer(string name,void *ptr,int index);
00033     
00034     // copy constructor
00035     NamedPointer(const NamedPointer &np);
00036     
00037     // Destructor
00038     virtual ~NamedPointer();
00039     
00040     // Get the Name
00041     string name();
00042     
00043     // Get the Pointer
00044     void *ptr();
00045     
00046     // Get the associated list
00047     void *list();
00048     
00049     // Get our associated index
00050     int index();
00051     
00052 private:
00053     string   m_name;
00054     int      m_index;
00055     void    *m_ptr; 
00056     void    *m_list;
00057     
00058     void    *copyList(void *list);
00059 };
00060 
00061 #endif // __NAMED_POINTER_H__