Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / apps / soreduce / Signature.h
blob2abe20fdcc1345d92c3f1346dd4f56e8912fb373
1 // -*- C++ -*-
2 // File: Signature.h
4 // Author: Phil Mesnier
7 #ifndef _SIGNATURE_H_
8 #define _SIGNATURE_H_
10 // Signature class encapsulates a single line of nm output. This line may be
11 // either an "undefined" name to be resolved, or text or data which resolves
12 // the unknowns. Some of the features of the Signature class are currently
13 // unused, such as owner_, which is anticipation of analysis that may lead to
14 // further code reduction. The premise being that unresolved symbols that are
15 // defined within otherwise unused code should not be resolved. However this
16 // information is not available in the output of nm. Further research is
17 // required.
19 // Signatures are reference counted to avoid duplication.
21 #include <ace/SString.h>
23 class Signature {
24 public:
25 enum Kind {
26 text_,
27 undef_
30 Signature (const ACE_CString &);
31 void used ();
32 int used_count() const;
34 const ACE_CString &name() const;
36 Signature *dup();
37 void release();
39 private:
40 ACE_CString name_;
41 int ref_count_;
42 int used_;
43 Signature * owner_;
44 Kind kind_;
47 #endif