Debugger - Stage 2 (artf511247)
[deliverable/titan.core.git] / core / Objid.hh
index c5828b55c80374c8d82387e7e75f179c03083dad..e0cfcb06b600a76ca39041502436de03ffa14c5f 100644 (file)
@@ -1,10 +1,23 @@
-///////////////////////////////////////////////////////////////////////////////
-// Copyright (c) 2000-2014 Ericsson Telecom AB
-// All rights reserved. This program and the accompanying materials
-// are made available under the terms of the Eclipse Public License v1.0
-// which accompanies this distribution, and is available at
-// http://www.eclipse.org/legal/epl-v10.html
-///////////////////////////////////////////////////////////////////////////////
+/******************************************************************************
+ * Copyright (c) 2000-2016 Ericsson Telecom AB
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *   Balasko, Jeno
+ *   Baranyi, Botond
+ *   Beres, Szabolcs
+ *   Delic, Adam
+ *   Forstner, Matyas
+ *   Raduly, Csaba
+ *   Szabados, Kristof
+ *   Szabo, Bence Janos
+ *   Szabo, Janos Zoltan – initial implementation
+ *   Tatarka, Gabor
+ *
+ ******************************************************************************/
 #ifndef OBJID_HH
 #define OBJID_HH
 
@@ -27,6 +40,10 @@ class OBJID : public Base_Type {
 
   void init_struct(int n_components);
   void copy_value();
+  
+  /** Initializes the object identifier with a string containing the components
+    * separated by dots. */
+  void from_string(char* p_str);
 
 public:
   typedef unsigned int objid_element;
@@ -67,7 +84,10 @@ public:
 #endif
 
   void log() const;
+  
   void set_param(Module_Param& param);
+  Module_Param* get_param(Module_Param_Name& param_name) const;
+  
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
 
@@ -83,9 +103,17 @@ public:
   boolean BER_decode_TLV(const TTCN_Typedescriptor_t& p_td,
                          const ASN_BER_TLV_t& p_tlv, unsigned L_form);
   int XER_encode(const XERdescriptor_t& p_td,
-                 TTCN_Buffer& p_buf, unsigned int flavor, int indent) const;
+                 TTCN_Buffer& p_buf, unsigned int flavor, int indent, embed_values_enc_struct_t*) const;
   int XER_decode(const XERdescriptor_t& p_td, XmlReaderWrap& reader,
-                 unsigned int flavor);
+                 unsigned int flavor, unsigned int flavor2, embed_values_dec_struct_t*);
+  
+  /** Encodes accordingly to the JSON encoding rules.
+    * Returns the length of the encoded data. */
+  int JSON_encode(const TTCN_Typedescriptor_t&, JSON_Tokenizer&) const;
+  
+  /** Decodes accordingly to the JSON decoding rules.
+    * Returns the length of the encoded data. */
+  int JSON_decode(const TTCN_Typedescriptor_t&, JSON_Tokenizer&, boolean);
 };
 
 // objid template class
@@ -114,7 +142,7 @@ public:
   OBJID_template& operator=(const OPTIONAL<OBJID>& other_value);
   OBJID_template& operator=(const OBJID_template& other_value);
 
-  boolean match(const OBJID& other_value) const;
+  boolean match(const OBJID& other_value, boolean legacy = FALSE) const;
   const OBJID& valueof() const;
 
   int size_of() const;
@@ -123,25 +151,26 @@ public:
   OBJID_template& list_item(unsigned int list_index);
 
   void log() const;
-  void log_match(const OBJID& match_value) const;
+  void log_match(const OBJID& match_value, boolean legacy = FALSE) const;
 
   void set_param(Module_Param& param);
+  Module_Param* get_param(Module_Param_Name& param_name) const;
 
   void encode_text(Text_Buf& text_buf) const;
   void decode_text(Text_Buf& text_buf);
 
-  boolean is_present() const;
-  boolean match_omit() const;
+  boolean is_present(boolean legacy = FALSE) const;
+  boolean match_omit(boolean legacy = FALSE) const;
 #ifdef TITAN_RUNTIME_2
   void valueofv(Base_Type* value) const { *(static_cast<OBJID*>(value)) = valueof(); }
   void set_value(template_sel other_value) { *this = other_value; }
   void copy_value(const Base_Type* other_value) { *this = *(static_cast<const OBJID*>(other_value)); }
   Base_Template* clone() const { return new OBJID_template(*this); }
   const TTCN_Typedescriptor_t* get_descriptor() const { return &OBJID_descr_; }
-  boolean matchv(const Base_Type* other_value) const { return match(*(static_cast<const OBJID*>(other_value))); }
-  void log_matchv(const Base_Type* match_value) const  { log_match(*(static_cast<const OBJID*>(match_value))); }
+  boolean matchv(const Base_Type* other_value, boolean legacy) const { return match(*(static_cast<const OBJID*>(other_value)), legacy); }
+  void log_matchv(const Base_Type* match_value, boolean legacy) const  { log_match(*(static_cast<const OBJID*>(match_value)), legacy); }
 #else
-  void check_restriction(template_res t_res, const char* t_name=NULL) const;
+  void check_restriction(template_res t_res, const char* t_name=NULL, boolean legacy = FALSE) const;
 #endif
 };
 
This page took 0.025537 seconds and 5 git commands to generate.