Safir SDK Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Operations.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Copyright Saab AB, 2006-2013 (http://safir.sourceforge.net)
4 *
5 * Created by: Lars Hagström / stlrha
6 *
7 *******************************************************************************
8 *
9 * This file is part of Safir SDK Core.
10 *
11 * Safir SDK Core is free software: you can redistribute it and/or modify
12 * it under the terms of version 3 of the GNU General Public License as
13 * published by the Free Software Foundation.
14 *
15 * Safir SDK Core is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22 *
23 ******************************************************************************/
24 
25 #ifndef __DOTS_TYPE_OPERATIONS_H__
26 #define __DOTS_TYPE_OPERATIONS_H__
27 
30 
31 namespace Safir
32 {
33 namespace Dob
34 {
35 namespace Typesystem
36 {
40 namespace Operations
41 {
54 
61 
68 
75 
81  DOTS_API TypeIdVector GetAllTypeIds();
82 
89  DOTS_API bool Exists(const Dob::Typesystem::TypeId typeId);
90 
99  DOTS_API bool IsClass(const Dob::Typesystem::TypeId typeId);
100 
109  DOTS_API bool IsProperty(const Dob::Typesystem::TypeId typeId);
110 
119  DOTS_API bool IsEnumeration(const Dob::Typesystem::TypeId typeId);
120 
129  DOTS_API bool IsException(const Dob::Typesystem::TypeId typeId);
130 
131 
132 
150  DOTS_API Dob::Typesystem::TypeId GetTypeId(const std::wstring & typeName);
151 
159  DOTS_API std::wstring GetName(const Dob::Typesystem::TypeId typeId);
160 
169 
178  DOTS_API std::wstring GetEnumerationValueName(const Dob::Typesystem::TypeId enumId,
179  const Dob::Typesystem::EnumerationValue enumVal);
180 
190  const std::wstring & enumValueName);
199 
216  DOTS_API bool IsOfType(const Dob::Typesystem::TypeId type,
217  const Dob::Typesystem::TypeId ofType);
218 
228  DOTS_API TypeIdVector GetClassTree(const Dob::Typesystem::TypeId rootClass);
229 
238 
246  DOTS_API bool HasProperty(const Dob::Typesystem::TypeId classType,
247  const Dob::Typesystem::TypeId propertyType);
248 
258  DOTS_API void HasProperty(const Dob::Typesystem::TypeId classType,
259  const Dob::Typesystem::TypeId propertyType,
260  bool & hasProperty,
261  bool & isInherited);
264 }
265 }
266 }
267 }
268 
269 #endif
DOTS_API bool IsEnumeration(const Dob::Typesystem::TypeId typeId)
Check if a type represented by a type id is an enumeration.
DOTS_API bool IsException(const Dob::Typesystem::TypeId typeId)
Check if a type represented by a type id is an exception.
DOTS_API bool IsProperty(const Dob::Typesystem::TypeId typeId)
Check if a type represented by a type id is a property.
DOTS_API Dob::Typesystem::TypeId GetParentType(const Dob::Typesystem::TypeId type)
Returns the typeId of the base class to the argument type.
DOTS_API bool IsOfType(const Dob::Typesystem::TypeId type, const Dob::Typesystem::TypeId ofType)
Checks if type is ofType or a subclass of ofType.
DotsC_TypeId TypeId
A unique type identifier.
Definition: Dob/Typesystem/Defs.h:221
DOTS_API Dob::Typesystem::Int32 GetNumberOfEnumerations()
Get the number of enum types defined in the system.
DOTS_API Dob::Typesystem::TypeId GetTypeId(const std::wstring &typeName)
Calculates the type id for the given name.
DOTS_API Dob::Typesystem::Int32 GetNumberOfClasses()
Get the number of classes defined in the system.
DOTS_API TypeIdVector GetAllTypeIds()
Get all type id&#39;s that exists in the system.
DOTS_API TypeIdVector GetClassTree(const Dob::Typesystem::TypeId rootClass)
Returns a list of all type id&#39;s that is of the given type by inheritance.
DOTS_API std::wstring GetName(const Dob::Typesystem::TypeId typeId)
Gets the name associated with the specified type id.
DOTS_API Dob::Typesystem::Int32 GetNumberOfTypeIds()
Get the number of type id&#39;s defined in the system.
DOTS_API Dob::Typesystem::Int32 GetNumberOfEnumerationValues(const Dob::Typesystem::TypeId enumId)
Get the number of enumeration values the specified enumeration type has.
DotsC_EnumerationValue EnumerationValue
The ordinal value of an enumeration.
Definition: Dob/Typesystem/Defs.h:273
DOTS_API std::wstring GetEnumerationValueName(const Dob::Typesystem::TypeId enumId, const Dob::Typesystem::EnumerationValue enumVal)
Get the string representation of the specified value for a enumeration type.
DotsC_Int32 Int32
32 bit integer type.
Definition: Dob/Typesystem/Defs.h:69
DOTS_API bool IsClass(const Dob::Typesystem::TypeId typeId)
Check if a type represented by a type id is a class.
DOTS_API bool Exists(const Dob::Typesystem::TypeId typeId)
Check if class with specified type id exist.
DOTS_API EnumerationValue GetEnumerationValue(const Dob::Typesystem::TypeId enumId, const std::wstring &enumValueName)
Get integer value associated with the enumeration value for the specified enumeration type...
DOTS_API Dob::Typesystem::Int32 GetNumberOfProperties()
Get the number of properties defined in the system.
DOTS_API bool HasProperty(const Dob::Typesystem::TypeId classType, const Dob::Typesystem::TypeId propertyType)
Checks if the a class has a property.
DOTS_API Dob::Typesystem::TypeId GetEnumerationChecksum(const Dob::Typesystem::TypeId enumId)
Get the Checksum over all enumeration members for an enumeration type.
std::vector< TypeId > TypeIdVector
A vector of TypeIds.
Definition: Dob/Typesystem/Defs.h:224