CLProtocol 3.5.1
XMLID.h
1//-----------------------------------------------------------------------------
2// (c) 2008 by Basler Vision Technologies
3// Section: Vision Components
4// Project: GenApi
5// Author: Fritz Dierks
6// $Header$
7//
8// License: This file is published under the license of the EMVA GENICAM_NAMESPACE Standard Group.
9// A text file describing the legal terms is included in your installation as 'GenICam_license.pdf'.
10// If for some reason you are missing this file please contact the EMVA or visit the website
11// (http://www.GENICAM_NAMESPACE.org) for a full copy.
12//
13// THIS SOFTWARE IS PROVIDED BY THE EMVA GENICAM_NAMESPACE STANDARD GROUP "AS IS"
14// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
15// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE EMVA GENICAM_NAMESPACE STANDARD GROUP
17// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
21// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23// POSSIBILITY OF SUCH DAMAGE.
24//-----------------------------------------------------------------------------
28#ifndef CLPROTOCOL_XMLID_H
29#define CLPROTOCOL_XMLID_H
30
31#include <Base/GCBase.h>
32#include <Base/GCUtilities.h>
33#include <CLProtocol/CVersion.h>
34
35namespace CLProtocol
36{
37
39
40 class CLPROTOCOL_DECL CXMLID
41 {
42 public:
44 static const char* GetTokenSeparator();
45
47
49 GENICAM_DEPRECATED( static const char* GetTokenSeperator() );
50
53
55 bool FromString(const GENICAM_NAMESPACE::gcstring &XMLID);
56
58 GENICAM_NAMESPACE::gcstring ToString();
59
62
65
67 GENICAM_NAMESPACE::gcstring GetDeviceIDTemplate() const;
68
70 bool operator>(CXMLID& XMLID);
71
72 private:
74 typedef enum
75 {
76 xidSchemaVersion = 0,
77 xidDeviceIDTemplate = 1,
78 xidDeviceVersion = 2
79 } EXMLIDIndex;
80
82 GENICAM_NAMESPACE::gcstring m_XMLID;
83
85 GENICAM_NAMESPACE::gcstring m_DeviceIDTemplate;
86
88 CVersion m_SchemaVersion;
89
91 CVersion m_DeviceVersion;
92 };
93
95
96 inline bool CompareCXMLID( CXMLID *pA, CXMLID *pB )
97 {
98 return *pA > *pB;
99 }
100}
101#endif // CLPROTOCOL_XMLID_H
Encapsulates a version number.
Definition CVersion.h:41
Helper class which can split XMLIDs strings into tokens.
Definition XMLID.h:41
GENICAM_NAMESPACE::gcstring GetDeviceIDTemplate() const
retrieves the schema version of the XML file
CVersion GetSchemaVersion() const
retrieves the schema version of the XML file
CXMLID()
Constructor.
bool FromString(const GENICAM_NAMESPACE::gcstring &XMLID)
Parses the XML ID.
CVersion GetDeviceVersion() const
retrieves the schema version of the XML file
GENICAM_DEPRECATED(static const char *GetTokenSeperator())
returns the token separator string
static const char * GetTokenSeparator()
returns the token separator string
GENICAM_NAMESPACE::gcstring ToString()
Returns the original XML ID.
bool operator>(CXMLID &XMLID)
Comparison (for sorting)