Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Properties.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_PROPERTIES_H__
26 #define __DOTS_PROPERTIES_H__
27 
35 
36 namespace Safir
37 {
38 namespace Dob
39 {
40 namespace Typesystem
41 {
50  {
51  public:
52 
63  const Dob::Typesystem::TypeId propertyId,
64  const Dob::Typesystem::MemberIndex propertyMember);
65 
66 
76  static void SetNull(Dob::Typesystem::ObjectPtr object,
77  const Dob::Typesystem::TypeId propertyId,
78  const Dob::Typesystem::MemberIndex member,
79  const Dob::Typesystem::ArrayIndex index);
80 
90  static bool IsNull(const Dob::Typesystem::ObjectPtr object,
91  const Dob::Typesystem::TypeId propertyId,
92  const Dob::Typesystem::MemberIndex member,
93  const Dob::Typesystem::ArrayIndex index);
94 
104  static bool IsChanged(const Dob::Typesystem::ObjectPtr object,
105  const Dob::Typesystem::TypeId propertyId,
106  const Dob::Typesystem::MemberIndex member,
107  const Dob::Typesystem::ArrayIndex index);
108 
126  static bool IsReadOnly(const Dob::Typesystem::ObjectPtr object,
127  const Dob::Typesystem::TypeId propertyId,
128  const Dob::Typesystem::MemberIndex member,
129  const Dob::Typesystem::ArrayIndex index);
130 
141  static void Set(Dob::Typesystem::ObjectPtr object,
142  const Dob::Typesystem::TypeId propertyId,
143  const bool value,
144  const Dob::Typesystem::MemberIndex member,
145  const Dob::Typesystem::ArrayIndex index);
146 
147 
159  static void Get(const Dob::Typesystem::ObjectPtr object,
160  const Dob::Typesystem::TypeId propertyId,
161  bool & value,
162  const Dob::Typesystem::MemberIndex member,
163  const Dob::Typesystem::ArrayIndex index);
164 
165 
166 
177  static void SetEnum(Dob::Typesystem::ObjectPtr object,
178  const Dob::Typesystem::TypeId propertyId,
180  const Dob::Typesystem::MemberIndex member,
181  const Dob::Typesystem::ArrayIndex index);
182 
194  static void GetEnum(const Dob::Typesystem::ObjectPtr object,
195  const Dob::Typesystem::TypeId propertyId,
197  const Dob::Typesystem::MemberIndex member,
198  const Dob::Typesystem::ArrayIndex index);
199 
210  static void Set(Dob::Typesystem::ObjectPtr object,
211  const Dob::Typesystem::TypeId propertyId,
212  const Dob::Typesystem::Int32 value,
213  const Dob::Typesystem::MemberIndex member,
214  const Dob::Typesystem::ArrayIndex index);
215 
216 
228  static void Get(const Dob::Typesystem::ObjectPtr object,
229  const Dob::Typesystem::TypeId propertyId,
230  Dob::Typesystem::Int32 & value,
231  const Dob::Typesystem::MemberIndex member,
232  const Dob::Typesystem::ArrayIndex index);
233 
244  static void Set(Dob::Typesystem::ObjectPtr object,
245  const Dob::Typesystem::TypeId propertyId,
246  const Dob::Typesystem::Int64 value,
247  const Dob::Typesystem::MemberIndex member,
248  const Dob::Typesystem::ArrayIndex index);
249 
250 
262  static void Get(const Dob::Typesystem::ObjectPtr object,
263  const Dob::Typesystem::TypeId propertyId,
264  Dob::Typesystem::Int64 & value,
265  const Dob::Typesystem::MemberIndex member,
266  const Dob::Typesystem::ArrayIndex index);
267 
278  static void Set(Dob::Typesystem::ObjectPtr object,
279  const Dob::Typesystem::TypeId propertyId,
280  const Dob::Typesystem::Float32 value,
281  const Dob::Typesystem::MemberIndex member,
282  const Dob::Typesystem::ArrayIndex index);
283 
284 
296  static void Get(const Dob::Typesystem::ObjectPtr object,
297  const Dob::Typesystem::TypeId propertyId,
298  Dob::Typesystem::Float32 & value,
299  const Dob::Typesystem::MemberIndex member,
300  const Dob::Typesystem::ArrayIndex index);
301 
312  static void Set(Dob::Typesystem::ObjectPtr object,
313  const Dob::Typesystem::TypeId propertyId,
314  const Dob::Typesystem::Float64 value,
315  const Dob::Typesystem::MemberIndex member,
316  const Dob::Typesystem::ArrayIndex index);
317 
318 
330  static void Get(const Dob::Typesystem::ObjectPtr object,
331  const Dob::Typesystem::TypeId propertyId,
332  Dob::Typesystem::Float64 & value,
333  const Dob::Typesystem::MemberIndex member,
334  const Dob::Typesystem::ArrayIndex index);
335 
346  static void Set(Dob::Typesystem::ObjectPtr object,
347  const Dob::Typesystem::TypeId propertyId,
348  const InstanceId & value,
349  const Dob::Typesystem::MemberIndex member,
350  const Dob::Typesystem::ArrayIndex index);
351 
352 
364  static void Get(const Dob::Typesystem::ObjectPtr object,
365  const Dob::Typesystem::TypeId propertyId,
366  InstanceId & value,
367  const Dob::Typesystem::MemberIndex member,
368  const Dob::Typesystem::ArrayIndex index);
369 
380  static void Set(Dob::Typesystem::ObjectPtr object,
381  const Dob::Typesystem::TypeId propertyId,
382  const Dob::Typesystem::EntityId & value,
383  const Dob::Typesystem::MemberIndex member,
384  const Dob::Typesystem::ArrayIndex index);
385 
386 
398  static void Get(const Dob::Typesystem::ObjectPtr object,
399  const Dob::Typesystem::TypeId propertyId,
401  const Dob::Typesystem::MemberIndex member,
402  const Dob::Typesystem::ArrayIndex index);
403 
414  static void Set(Dob::Typesystem::ObjectPtr object,
415  const Dob::Typesystem::TypeId propertyId,
416  const ChannelId & value,
417  const Dob::Typesystem::MemberIndex member,
418  const Dob::Typesystem::ArrayIndex index);
419 
420 
432  static void Get(const Dob::Typesystem::ObjectPtr object,
433  const Dob::Typesystem::TypeId propertyId,
434  ChannelId & value,
435  const Dob::Typesystem::MemberIndex member,
436  const Dob::Typesystem::ArrayIndex index);
437 
448  static void Set(Dob::Typesystem::ObjectPtr object,
449  const Dob::Typesystem::TypeId propertyId,
450  const HandlerId & value,
451  const Dob::Typesystem::MemberIndex member,
452  const Dob::Typesystem::ArrayIndex index);
453 
454 
466  static void Get(const Dob::Typesystem::ObjectPtr object,
467  const Dob::Typesystem::TypeId propertyId,
468  HandlerId & value,
469  const Dob::Typesystem::MemberIndex member,
470  const Dob::Typesystem::ArrayIndex index);
471 
482  static void Set(Dob::Typesystem::ObjectPtr object,
483  const Dob::Typesystem::TypeId propertyId,
484  const std::wstring & value,
485  const Dob::Typesystem::MemberIndex member,
486  const Dob::Typesystem::ArrayIndex index);
487 
488 
500  static void Get(const Dob::Typesystem::ObjectPtr object,
501  const Dob::Typesystem::TypeId propertyId,
502  std::wstring & value,
503  const Dob::Typesystem::MemberIndex member,
504  const Dob::Typesystem::ArrayIndex index);
505 
516  static void Set(Dob::Typesystem::ObjectPtr object,
517  const Dob::Typesystem::TypeId propertyId,
518  const Dob::Typesystem::ObjectPtr ptr,
519  const Dob::Typesystem::MemberIndex member,
520  const Dob::Typesystem::ArrayIndex index);
521 
522 
534  static void Get(const Dob::Typesystem::ObjectPtr object,
535  const Dob::Typesystem::TypeId propertyId,
537  const Dob::Typesystem::MemberIndex member,
538  const Dob::Typesystem::ArrayIndex index);
539 
550  static void Set(Dob::Typesystem::ObjectPtr object,
551  const Dob::Typesystem::TypeId propertyId,
552  const Dob::Typesystem::Binary & value,
553  const Dob::Typesystem::MemberIndex member,
554  const Dob::Typesystem::ArrayIndex index);
555 
556 
568  static void Get(const Dob::Typesystem::ObjectPtr object,
569  const Dob::Typesystem::TypeId propertyId,
570  Dob::Typesystem::Binary & value,
571  const Dob::Typesystem::MemberIndex member,
572  const Dob::Typesystem::ArrayIndex index);
573 
574 
575 
576 
577 
578  private:
579  static void DereferenceClassMemberReference(Dob::Typesystem::Object & object,
580  DotsC_Int32 const * const classmemberref,
581  const DotsC_Int32 refSize,
582  const Dob::Typesystem::ArrayIndex index,
583  Dob::Typesystem::ContainerBase * & container, //out
584  bool & parentIsChanged); //out
585 
586 
587  static void DereferenceClassMemberReference(const Dob::Typesystem::Object & object,
588  DotsC_Int32 const * const classmemberref,
589  const DotsC_Int32 refSize,
590  const Dob::Typesystem::ArrayIndex index,
591  Dob::Typesystem::ContainerBase const * & container, //out
592  bool & parentIsChanged); //out
593 
594  };
595 }
596 }
597 }
598 
599 #endif
600 
Class containing the identity of a channel.
Definition: ChannelId.h:44
The base class for all DOB objects.
Definition: Object.h:54
Class containing the identity of an entity.
Definition: EntityId.h:41
Class containing the identity of a handler.
Definition: HandlerId.h:44
DotsC_Float64 Float64
64 bit floating point type.
Definition: Defs.h:76
Class containing the identity of an instance.
Definition: InstanceId.h:47
Functions for getting property information from types and objects.
Definition: Properties.h:49
DotsC_Int64 Int64
64 bit integer type.
Definition: Defs.h:70
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:219
DotsC_Float32 Float32
32 bit floating point type.
Definition: Defs.h:73
boost::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition: Object.h:41
DotsC_ArrayIndex ArrayIndex
Index into an array.
Definition: Defs.h:247
DOTS_CPP_API Dob::Typesystem::Int32 GetArraySize(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member)
Get the array size of a member.
Base class for all Containers.
Definition: ContainerBase.h:41
DotsC_EnumerationValue EnumerationValue
The ordinal value of an enumeration.
Definition: Defs.h:271
DotsC_Int32 Int32
32 bit integer type.
Definition: Defs.h:67
#define DOTS_CPP_API
Definition: Defs.h:33
DotsC_MemberIndex MemberIndex
The index of a member in an object.
Definition: Defs.h:238
static bool IsChanged(const ContainerBase &container)
Check if a container is changed.
Definition: ContainerBase.h:134
std::vector< char > Binary
A type to contain binary data.
Definition: Defs.h:294