Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
BlobOperations.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 __BLOBOPERATIONS_H__
26 #define __BLOBOPERATIONS_H__
27 
33 
34 namespace Safir
35 {
36 namespace Dob
37 {
38 
39 namespace Typesystem
40 {
54  {
55  public:
56 
63  static TypeId GetTypeId(const char * const blob);
64 
71  static Int32 GetSize(char const * const blob);
72 
81  static bool IsChanged(char const * const blob);
82 
96  static bool IsChanged(const char * const blob,
97  const Dob::Typesystem::MemberIndex member,
98  const Dob::Typesystem::ArrayIndex index);
99 
110  static void SetNull(char * const blob,
111  const Dob::Typesystem::MemberIndex member,
112  const Dob::Typesystem::ArrayIndex index);
113 
128  static void Set(char * const blob,
129  const Dob::Typesystem::MemberIndex member,
130  const Dob::Typesystem::ArrayIndex index,
131  const bool value,
132  const bool isNull,
133  const bool isChanged);
134 
148  static void Get(char const * const blob,
149  const Dob::Typesystem::MemberIndex member,
150  const Dob::Typesystem::ArrayIndex index,
151  bool & value,
152  bool & isNull,
153  bool & isChanged);
154 
155 
170  static void Set(char * const blob,
171  const Dob::Typesystem::MemberIndex member,
172  const Dob::Typesystem::ArrayIndex index,
173  const Int32 value,
174  const bool isNull,
175  const bool isChanged);
176 
190  static void Get(char const * const blob,
191  const Dob::Typesystem::MemberIndex member,
192  const Dob::Typesystem::ArrayIndex index,
193  Int32 & value,
194  bool & isNull,
195  bool & isChanged);
196 
197 
212  static void Set(char * const blob,
213  const Dob::Typesystem::MemberIndex member,
214  const Dob::Typesystem::ArrayIndex index,
215  const Int64 value,
216  const bool isNull,
217  const bool isChanged);
218 
232  static void Get(char const * const blob,
233  const Dob::Typesystem::MemberIndex member,
234  const Dob::Typesystem::ArrayIndex index,
235  Int64 & value,
236  bool & isNull,
237  bool & isChanged);
238 
239 
254  static void Set(char * const blob,
255  const Dob::Typesystem::MemberIndex member,
256  const Dob::Typesystem::ArrayIndex index,
257  const Float32 value,
258  const bool isNull,
259  const bool isChanged);
260 
274  static void Get(char const * const blob,
275  const Dob::Typesystem::MemberIndex member,
276  const Dob::Typesystem::ArrayIndex index,
277  Float32 & value,
278  bool & isNull,
279  bool & isChanged);
280 
281 
296  static void Set(char * const blob,
297  const Dob::Typesystem::MemberIndex member,
298  const Dob::Typesystem::ArrayIndex index,
299  const Float64 value,
300  const bool isNull,
301  const bool isChanged);
302 
316  static void Get(char const * const blob,
317  const Dob::Typesystem::MemberIndex member,
318  const Dob::Typesystem::ArrayIndex index,
319  Float64 & value,
320  bool & isNull,
321  bool & isChanged);
322 
336  static void Get(char const * const blob,
337  const Dob::Typesystem::MemberIndex member,
338  const Dob::Typesystem::ArrayIndex index,
339  InstanceId & value,
340  bool & isNull,
341  bool & isChanged);
342 
356  static void Get(char const * const blob,
357  const Dob::Typesystem::MemberIndex member,
358  const Dob::Typesystem::ArrayIndex index,
359  EntityId & value,
360  bool & isNull,
361  bool & isChanged);
362 
376  static void Get(char const * const blob,
377  const Dob::Typesystem::MemberIndex member,
378  const Dob::Typesystem::ArrayIndex index,
379  ChannelId & value,
380  bool & isNull,
381  bool & isChanged);
382 
396  static void Get(char const * const blob,
397  const Dob::Typesystem::MemberIndex member,
398  const Dob::Typesystem::ArrayIndex index,
399  HandlerId & value,
400  bool & isNull,
401  bool & isChanged);
402 
416  static void Get(char const * const blob,
417  const Dob::Typesystem::MemberIndex member,
418  const Dob::Typesystem::ArrayIndex index,
419  std::wstring & value,
420  bool & isNull,
421  bool & isChanged);
422 
436  static void Get(char * const blob,
437  const Dob::Typesystem::MemberIndex member,
438  const Dob::Typesystem::ArrayIndex index,
439  const char * & childBlob,
440  bool & isNull,
441  bool & isChanged);
442 
456  static void Get(char const * const blob,
457  const Dob::Typesystem::MemberIndex member,
458  const Dob::Typesystem::ArrayIndex index,
459  Dob::Typesystem::Binary & value,
460  bool & isNull,
461  bool & isChanged);
462 
482  static void Set(const BooleanContainer & value,
483  char * const blob,
484  const Dob::Typesystem::MemberIndex member,
485  const Dob::Typesystem::ArrayIndex index);
486 
498  static void Get(BooleanContainer & value,
499  char const * const blob,
500  const Dob::Typesystem::MemberIndex member,
501  const Dob::Typesystem::ArrayIndex index);
502 
514  static void Set(const EnumerationContainerBase & value,
515  char * const blob,
516  const Dob::Typesystem::MemberIndex member,
517  const Dob::Typesystem::ArrayIndex index);
518 
530  static void Get(EnumerationContainerBase & value,
531  char const * const blob,
532  const Dob::Typesystem::MemberIndex member,
533  const Dob::Typesystem::ArrayIndex index);
534 
535 
547  static void Set(const Int32Container & value,
548  char * const blob,
549  const Dob::Typesystem::MemberIndex member,
550  const Dob::Typesystem::ArrayIndex index);
551 
563  static void Get(Int32Container & value,
564  char const * const blob,
565  const Dob::Typesystem::MemberIndex member,
566  const Dob::Typesystem::ArrayIndex index);
567 
568 
580  static void Set(const Int64Container & value, //will be used on TypeIdContainers too
581  char * const blob,
582  const Dob::Typesystem::MemberIndex member,
583  const Dob::Typesystem::ArrayIndex index);
584 
596  static void Get(Int64Container & value,
597  char const * const blob,
598  const Dob::Typesystem::MemberIndex member,
599  const Dob::Typesystem::ArrayIndex index);
600 
601 
613  static void Set(const Float32Container & value,
614  char * const blob,
615  const Dob::Typesystem::MemberIndex member,
616  const Dob::Typesystem::ArrayIndex index);
617 
629  static void Get(Float32Container & value,
630  char const * const blob,
631  const Dob::Typesystem::MemberIndex member,
632  const Dob::Typesystem::ArrayIndex index);
633 
634 
646  static void Set(const Float64Container & value,
647  char * const blob,
648  const Dob::Typesystem::MemberIndex member,
649  const Dob::Typesystem::ArrayIndex index);
650 
662  static void Get(Float64Container & value,
663  char const * const blob,
664  const Dob::Typesystem::MemberIndex member,
665  const Dob::Typesystem::ArrayIndex index);
666 
679  static void Set(const InstanceIdContainer & value,
680  char * const blob,
681  char * & beginningOfUnused,
682  const Dob::Typesystem::MemberIndex member,
683  const Dob::Typesystem::ArrayIndex index);
684 
696  static void Get(InstanceIdContainer & value,
697  char const * const blob,
698  const Dob::Typesystem::MemberIndex member,
699  const Dob::Typesystem::ArrayIndex index);
700 
713  static void Set(const EntityIdContainer & value,
714  char * const blob,
715  char * & beginningOfUnused,
716  const Dob::Typesystem::MemberIndex member,
717  const Dob::Typesystem::ArrayIndex index);
718 
730  static void Get(EntityIdContainer & value,
731  char const * const blob,
732  const Dob::Typesystem::MemberIndex member,
733  const Dob::Typesystem::ArrayIndex index);
734 
747  static void Set(const ChannelIdContainer & value,
748  char * const blob,
749  char * & beginningOfUnused,
750  const Dob::Typesystem::MemberIndex member,
751  const Dob::Typesystem::ArrayIndex index);
752 
764  static void Get(ChannelIdContainer & value,
765  char const * const blob,
766  const Dob::Typesystem::MemberIndex member,
767  const Dob::Typesystem::ArrayIndex index);
768 
781  static void Set(const HandlerIdContainer & value,
782  char * const blob,
783  char * & beginningOfUnused,
784  const Dob::Typesystem::MemberIndex member,
785  const Dob::Typesystem::ArrayIndex index);
786 
798  static void Get(HandlerIdContainer & value,
799  char const * const blob,
800  const Dob::Typesystem::MemberIndex member,
801  const Dob::Typesystem::ArrayIndex index);
802 
815  static void Set(const StringContainer & value,
816  char * const blob,
817  char * & beginningOfUnused,
818  const Dob::Typesystem::MemberIndex member,
819  const Dob::Typesystem::ArrayIndex index);
820 
832  static void Get(StringContainer & value,
833  char const * const blob,
834  const Dob::Typesystem::MemberIndex member,
835  const Dob::Typesystem::ArrayIndex index);
836 
837 
850  static void Set(const ObjectContainerBase & object,
851  char * const blob,
852  char * & beginningOfUnused,
853  const Dob::Typesystem::MemberIndex member,
854  const Dob::Typesystem::ArrayIndex index);
855 
867  static void Get(ObjectContainerBase & object,
868  char const * const blob,
869  const Dob::Typesystem::MemberIndex member,
870  const Dob::Typesystem::ArrayIndex index);
871 
884  static void Set(const BinaryContainer & binary,
885  char * const blob,
886  char * & beginningOfUnused,
887  const Dob::Typesystem::MemberIndex member,
888  const Dob::Typesystem::ArrayIndex index);
889 
901  static void Get(BinaryContainer & binary,
902  char const * const blob,
903  const Dob::Typesystem::MemberIndex member,
904  const Dob::Typesystem::ArrayIndex index);
905 
906 
907 
908 
909 
910 
911 
923  static Int32 GetInitialSize(const TypeId typeId);
924  };
925 }
926 }
927 }
928 #endif
929 
Container for base types.
Definition: ValueContainers.h:60
Class containing the identity of a channel.
Definition: ChannelId.h:44
Operations on blobs.
Definition: BlobOperations.h:53
Class containing the identity of an entity.
Definition: EntityId.h:41
Class containing the identity of a handler.
Definition: HandlerId.h:44
DOTS_CPP_API Dob::Typesystem::TypeId GetTypeId(const Dob::Typesystem::TypeId typeId, const Dob::Typesystem::MemberIndex member)
Get type id of object or enumeration member.
DotsC_Float64 Float64
64 bit floating point type.
Definition: Defs.h:76
Base class for all object containers.
Definition: ObjectContainer.h:46
Container for Binary.
Definition: ValueContainers.h:260
Class containing the identity of an instance.
Definition: InstanceId.h:47
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
Container for strings (std::wstring).
Definition: ValueContainers.h:128
Base class for containers of enumeration values.
Definition: EnumerationContainerBase.h:50
DotsC_ArrayIndex ArrayIndex
Index into an array.
Definition: Defs.h:247
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