1 ///////////////////////////////////////////////////////////////////////////////
2 // Copyright (c) 2000-2014 Ericsson Telecom AB
3 // All rights reserved. This program and the accompanying materials
4 // are made available under the terms of the Eclipse Public License v1.0
5 // which accompanies this distribution, and is available at
6 // http://www.eclipse.org/legal/epl-v10.html
7 ///////////////////////////////////////////////////////////////////////////////
11 #include "AST_asn1.hh"
22 using namespace Common;
29 * Parameterized reference.
31 class Ref_pard : public Ref_defd {
33 Ref_defd_simple *ref_parass; /**< ref. to the par.d ass. */
34 Block *block; /**< actual parameter list */
35 bool refd_ass_is_not_pard;
37 Ref_defd_simple *ref_ds; /**< name of the instantiated stuff */
39 Ref_pard(const Ref_pard& p);
41 Ref_pard(Ref_defd_simple *p_refds, Block *p_block);
43 /** Virtual constructor. */
44 virtual Ref_pard *clone() const;
45 virtual void set_fullname(const string& p_fullname);
46 virtual void set_my_scope(Scope *p_scope);
47 virtual bool get_is_erroneous();
48 virtual string get_dispname();
49 /** Instantiates the reference. */
50 virtual Ref_defd_simple* get_ref_defd_simple();
51 virtual void dump(unsigned level) const;
55 * Class to represent FieldName. FieldName is a sequence of
56 * PrimitiveFieldNames.
58 class FieldName : public Node {
60 vector<Identifier> fields;
62 FieldName(const FieldName& p);
64 FieldName() : Node() { }
66 virtual FieldName *clone() const;
67 void add_field(Identifier *p_id);
68 virtual string get_dispname() const;
69 size_t get_nof_fields() const { return fields.size(); }
70 Identifier* get_field_byIndex(size_t p_i) const { return fields[p_i]; }
74 * Class to represent InformationFromObjects.
76 class FromObj : public Common::Reference {
78 /** ObjectClass, Object or ObjectSet */
81 Setting *setting; /**< contains the ObejctClassFieldType, OpenType or
82 OS_defn that was created in get_refd_setting()
84 Setting *setting_cache;
86 FromObj(const FromObj& p);
88 FromObj(Ref_defd *p_ref_defd, FieldName *p_fn);
90 virtual FromObj *clone() const;
91 virtual void set_fullname(const string& p_fullname);
92 virtual void set_my_scope(Scope *p_scope);
93 virtual bool get_is_erroneous();
94 virtual string get_dispname();
95 virtual Setting* get_refd_setting();
96 virtual Common::Assignment* get_refd_assignment(bool check_parlist = true);
97 virtual bool has_single_expr();
98 virtual void generate_code (expression_struct_t *expr);
99 virtual void generate_code_const_ref(expression_struct_t *expr);
102 /** @} end of AST group */
106 #endif // _Asn_Ref_HH