VR-Exchange 2.2 API Documentation
objectFilter.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2012 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <namespace.h>
13 #include <mtl/configVar.h>
14 #include <vlpi/entityType.h>
15 
16 class DtEntityType;
17 
18 namespace MAKVrExchange
19 {
20 
23  class DT_DLL_BROKER DtObjectFilter
24  {
25  public:
26 
29  {
30  FilterByEntityName = 0,
31  FilterByEntityType = 1,
32  FilterByMarkingText = 2
33  };
34 
35  public:
36 
40  DtObjectFilter( FilterType type, DtString filter );
41 
44  DtObjectFilter( const DtObjectFilter& filter );
45 
47  virtual ~DtObjectFilter();
48 
50  virtual DtObjectFilter& operator = ( const DtObjectFilter& filter );
51 
53  virtual bool operator == ( const DtObjectFilter& filter ) const;
54 
56  inline bool operator != ( const DtObjectFilter& filter ) const
57  {
58  return !( *this == filter );
59  }
60 
62  bool operator < ( const DtObjectFilter& filter ) const;
63 
66  virtual FilterType type() const;
67 
71  virtual DtString string() const;
72 
75 
76  static void setObjectValue( DtEnvValueSP obj, const DtString& objectValue );
77  static DtString getObjectValue( DtEnvValueSP obj );
78 
79  static DtString toString( const DtObjectFilter& filter );
80  static DtObjectFilter fromString( const DtString& str );
81  static DtEnvValueSP createSchema( DtEnvironment env );
82  static void toEnvironment( DtEnvironment env, DtObjectFilter filter );
83  static DtObjectFilter fromEnvironment( DtEnvironment env );
84 
86 
87  protected:
88 
91 
92  };
93 
94 }
95 
96 
99 template <>
100 struct DT_DLL_BROKER DtVarType<MAKVrExchange::DtObjectFilter>
101 {
103  typedef _NativeTypeToArg<MAKVrExchange::DtObjectFilter>::Type ArgType;
104 
105  // Get the native type string.
106  static DtString nativeNameOfType();
107 
108  // Get the CmdLine ARG type string.
109  static DtString argNameOfType();
110 
111  // Get the XML schema type string.
112  static DtString xsNameOfType();
113 
114  // To and from CmdLine Argument types.
115  static ArgType convertToArgType( MAKVrExchange::DtObjectFilter value );
116  static MAKVrExchange::DtObjectFilter convertFromArgType( ArgType value );
117 
118  // To and From String conversions
119  static DtString convertToString( MAKVrExchange::DtObjectFilter value );
120  static MAKVrExchange::DtObjectFilter convertFromString( const DtString& value );
121 
122  // Get Schema Type
123  static DtEnvValueSP createSchemaType( DtEnvironment env );
124 
125  // To and From Environment Value
126  static void convertToEnvironmentValue( DtEnvironment env, MAKVrExchange::DtObjectFilter value );
127  static MAKVrExchange::DtObjectFilter convertFromEnvironmentValue( DtEnvironment env );
128 
129 };

Document ID: Generated on Mon Apr 15 17:15:50 EDT 2013 from SVN revision 126154
Copyright © 2005-2012 VT MÄK. All Rights Reserved (www.mak.com)